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 15946 - [Shadow]: Specify a way to select elements in content
Summary: [Shadow]: Specify a way to select elements in content
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: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 16009
  Show dependency treegraph
 
Reported: 2012-02-10 00:11 UTC by Dimitri Glazkov
Modified: 2012-03-15 22:37 UTC (History)
3 users (show)

See Also:


Attachments

Description Dimitri Glazkov 2012-02-10 00:11:19 UTC
In http://dglazkov.github.com/Tabs/, there is a definite need to address host children that are selected by the insertion points. Perhaps a ::content selector?
Comment 1 Tab Atkins Jr. 2012-02-28 00:54:18 UTC
Selectors 4 has a reference combinator that may be appropriate for this.  You could do something like:

content.foo /select/ input

Which would grab all the <input>s that were directly grabbed by the content.foo element.

This makes it somewhat less obvious that you're crossing the shadow boundary, but I think that's still okay.  The reference combinator is always going to be slightly weird.
Comment 2 Dimitri Glazkov 2012-03-09 22:56:21 UTC
(In reply to comment #1)
> Selectors 4 has a reference combinator that may be appropriate for this.  You
> could do something like:
> 
> content.foo /select/ input
> 
> Which would grab all the <input>s that were directly grabbed by the content.foo
> element.
> 
> This makes it somewhat less obvious that you're crossing the shadow boundary,
> but I think that's still okay.  The reference combinator is always going to be
> slightly weird.

This will work!
Comment 3 Dimitri Glazkov 2012-03-10 00:15:29 UTC
http://dvcs.w3.org/hg/webcomponents/rev/64fa6ff17919
Comment 4 Dimitri Glazkov 2012-03-15 22:37:01 UTC
Travis, Tony -- this also enables testability of node distribution correctness:

ShadowRoot.querySelector('content.foo \select\ *')

should give you all the nodes distributed into content.foo.