Re: [whatwg/dom] Declarative Shadow DOM (#831)

> > Also, this poses another problem. Since the component would never know when the children had finished parsing, there is no point in which the component is safe to attach a shadow root until your sibling or your ancestor's sibling starts appearing. Having to write that kind of code manually everywhere seems very fragile & developer hostile.
> 
> So it sounds like you think we need to solve the [parser finished / children changed](https://github.com/w3c/webcomponents/issues/809) problem. I agree (and it sounds like many developers do also) that we should solve that problem. However, I'm hoping we can avoid tying these two proposals together. There are myriad other problems that are also waiting on that solution, so this will just be one more such problem. Let's work on that one also! But let's not stall DSR while we wait.

I think this issue is important given that, even if there is eventually a way to learn that the parser has finished parsing all descendants, you'll still need to add guards throughout your component to handle being in the 'waiting for a possible shadow root' state. Is there a way that declarative shadow root attachment could be pinned down to a specific point in time?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/831#issuecomment-608197869

Received on Friday, 3 April 2020 02:40:11 UTC