This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22399 - [Shadow]: ShadowRoot should have an host property
Summary: [Shadow]: ShadowRoot should have an host property
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Hayato Ito
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
: 20605 23462 (view as bug list)
Depends on:
Blocks: 22715
  Show dependency treegraph
 
Reported: 2013-06-18 19:33 UTC by Elliott Sprehn
Modified: 2013-10-25 06:40 UTC (History)
3 users (show)

See Also:


Attachments

Description Elliott Sprehn 2013-06-18 19:33:44 UTC
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.
Comment 1 Dominic Cooney 2013-06-21 14:22:29 UTC
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.
Comment 2 Dimitri Glazkov 2013-07-17 19:44:09 UTC
*** Bug 20605 has been marked as a duplicate of this bug. ***
Comment 3 Dimitri Glazkov 2013-10-08 17:48:54 UTC
*** Bug 23462 has been marked as a duplicate of this bug. ***
Comment 4 Elliott Sprehn 2013-10-08 18:02:06 UTC
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. :(
Comment 5 Hayato Ito 2013-10-24 08:43:43 UTC
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.
Comment 6 Hayato Ito 2013-10-24 10:43:17 UTC
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.
Comment 7 Hayato Ito 2013-10-25 03:38:10 UTC
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.
Comment 8 Hayato Ito 2013-10-25 06:40:43 UTC
I've updated the spec:
https://dvcs.w3.org/hg/webcomponents/rev/6743f1ace623

If you have a concern, please let me know that.