This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The relevant background is: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24421
At first, we should decide whether we should calculate distribution or not in disconnected nodes. From the comments in https://www.w3.org/Bugs/Public/show_bug.cgi?id=24421, there are opinions we should calculate distribution because event.path depends on that. That sounds reasonable. On the other hand, I've never heard any use cases of distribution for disconnected nodes so far. Note that, although styles and distributions are completely different concepts, we don't calculate styles for disconnected nodes. From the perspective of completeness of the specification, I think we should calculate distribution even in disconnected nodes. However, I am not sure this is hight priority tasks or not, given that no one depends on this behavior so far. Please correct me if this is wrong. I don't have strong opinion either. Please leave comments so that we can raise the priority of this issue.
> we don't calculate styles for disconnected nodes That's not necessarily true. Web pages can ask for the computed style of such nodes. But again, this is irrelevant given that web components can expose APIs that depend on the shadow DOM being set up correctly. So whether you in fact set it up seems quite observable to me. You can, of course, do it lazily just like you compute styles lazily in this situation. > I am not sure this is hight priority tasks or not It's really surprising to me that this wasn't done already....
(In reply to Boris Zbarsky from comment #2) > > we don't calculate styles for disconnected nodes > > That's not necessarily true. Web pages can ask for the computed style of > such nodes. Looks like this is yet another *broken* feature in WebKit and Blink for disconnected elements. From the perspective of spec, styles should be computed on getComputedStyle() and so on.
I am now positive to support disconnected elements in the Shadow DOM spec. Let me work on this. I have to update several parts carefully.
I've updated the spec: https://github.com/w3c/webcomponents/commit/bc9e62c9e6c13229f6944f4c798f603ad98b7697 Thanks to the concept of trees of trees, updating the spec is not so hard than I expected.