This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
ShadowRoot.host should let you walk up the tree to the Document. This is important for doing certain kinds of hit testing (computing offsets) and finding containers.
In the world without shadow encapsulation in which we find ourselves (shadowRoot, olderShadowRoot, etc.) having ShadowRoot.host too makes sense. I believe this was heavily canvassed on an earlier bug. Can we reopen that one? There might be something pertinent already discussed.
*** Bug 20605 has been marked as a duplicate of this bug. ***
*** Bug 23462 has been marked as a duplicate of this bug. ***
What's the status of this? I see lots of other things have made it into the spec recently but this one property is still missing. :(
I am okay to add the host property to the ShadowRoot. Is there any objection? If there is no objection in a week, let me add that.
If we can add ShadowRoot.host, it might be also okay add ShadowRoot.olderShadowRoot. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=20260. They are similar in a sense of encapsulation. Actually ShadowRoot.olderShadowRoot has already been implemented in blink behind the flag.
Let me add ShadowRoot.host to the spec. I think We don't have a clear reason to reject ShadowRoot.host if we allow ShadowRoot.olderShadowRoot. The spec has ShadowRoot.olderShadowRoot, which was already implemented in blink behind the flag.
I've updated the spec: https://dvcs.w3.org/hg/webcomponents/rev/6743f1ace623 If you have a concern, please let me know that.