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 16229 - [Shadow]: Consider a combinator for activating content when a selector matches
Summary: [Shadow]: Consider a combinator for activating content when a selector matches
Status: RESOLVED WONTFIX
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: 15480
  Show dependency treegraph
 
Reported: 2012-03-05 05:35 UTC by Dominic Cooney
Modified: 2014-02-11 18:58 UTC (History)
2 users (show)

See Also:


Attachments

Description Dominic Cooney 2012-03-05 05:35:23 UTC
The <content> element’s fallback content is displayed when its selector does not match anything. It would be useful if there was an element whose fallback content is displayed when the selector matches something, ie the fallback content is displayed in lieu of the selected content.

For example, you could make the labels of a tab strip this way:

<content select="h2:nth-of-type(-n+3)"></content>
<content select="h2:nth-of-type(-n+2)"></content>
<content select="h2:nth-of-type(-n+1)"></content>
<content magic="awesome" select="h2">
  …
</content>

The idea here is that the magic="awesome" attribute changes the behavior of the content element and the "…" indicator of more tabs would only be displayed if the selector *did* match more h2 elements.
Comment 1 Dimitri Glazkov 2012-03-05 20:13:21 UTC
whoa.
Comment 2 Dimitri Glazkov 2014-02-11 18:58:27 UTC
In these situations, the author might be better of with an imperative API?