You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not think this is the correct place for this question, but if someone could point me in the right direction that would be great. Thanks.
Is there a deterministic approach for querying the light dom of a custom element? In the following example this.children is empty in the console.log, but the console.log wrapped in the setTimeout has 2 children.
You can't rely on your children to be present due to the way HTML parser works (it can add more children as the streamed content arrives). Instead, you should be doing work in child node's connectedCallback. If that's not possible, I'd suggest using MutationObserver to observe the changes to the child nodes. In general, there is no callback for when all children are inserted since there could be more children being inserted by DOM manipulation. See #619
I do not think this is the correct place for this question, but if someone could point me in the right direction that would be great. Thanks.
Is there a deterministic approach for querying the light dom of a custom element? In the following example
this.children
is empty in theconsole.log
, but theconsole.log
wrapped in thesetTimeout
has 2 children.The text was updated successfully, but these errors were encountered: