Closed DrSensor closed 1 year ago
Cause: connectedCallback() doesn't guarantee all children are connected when the browser still parsing (explanation)
connectedCallback()
Solution: move children to shadow root on every slotchange then remove that <slot/> when <render-scope> has nextSibling.
slotchange
<slot/>
<render-scope>
nextSibling
In my previous prototype, the glitch are really clear when override the attribute value from class module at load time or infer the accessor value from attribute.
Cause:
connectedCallback()
doesn't guarantee all children are connected when the browser still parsing (explanation)Solution: move children to shadow root on every
slotchange
then remove that<slot/>
when<render-scope>
hasnextSibling
.In my previous prototype, the glitch are really clear when override the attribute value from class module at load time or infer the accessor value from attribute.