We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You can find in spec the next:
The content getter steps are to return template's template contents, if the template contents is not a ShadowRoot node; otherwise null.
We see that the content attribute may return the null value, interesting...
null
Maybe template contents algorithm may say more?
Let doc be the template element's node document's appropriate template contents owner document. Create a DocumentFragment object whose node document is doc and host is the template element. Set the template element's template contents to the newly created DocumentFragment object.
Let doc be the template element's node document's appropriate template contents owner document.
Create a DocumentFragment object whose node document is doc and host is the template element.
Set the template element's template contents to the newly created DocumentFragment object.
Well, the template contents return the DocumentFragment constantly.
So where is the case when template.content return the null value?
template.content
I found the case when template contents of template has a shadow root.
Attach a shadow root with declarative shadow host element, mode, clonable, serializable, delegatesFocus, and "named". If an exception is thrown, then catch it, report the exception, insert an element at the adjusted insertion location with template, and return. Let shadow be declarative shadow host element's shadow root. Set shadow's declarative to true. Set template's template contents property to shadow. Set shadow's available to element internals to true.
Attach a shadow root with declarative shadow host element, mode, clonable, serializable, delegatesFocus, and "named". If an exception is thrown, then catch it, report the exception, insert an element at the adjusted insertion location with template, and return.
Let shadow be declarative shadow host element's shadow root.
Set shadow's declarative to true.
Set template's template contents property to shadow.
Set shadow's available to element internals to true.
But how can I see reflection of 4 step? When and where can I write template.content and get the null value? Thanks.
The text was updated successfully, but these errors were encountered:
These sorts of "help" questions are best for StackOverflow.
Sorry, something went wrong.
@domenic do you think guys on SO knows answer when this thing appeared in 2023?
No branches or pull requests
You can find in spec the next:
We see that the content attribute may return the
null
value, interesting...Maybe template contents algorithm may say more?
Well, the template contents return the DocumentFragment constantly.
So where is the case when
template.content
return thenull
value?I found the case when template contents of template has a shadow root.
But how can I see reflection of 4 step? When and where can I write
template.content
and get thenull
value? Thanks.The text was updated successfully, but these errors were encountered: