W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Opera's Proposal for :context Selector

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 13 Jul 2008 14:32:11 -0700
Message-ID: <487A745B.30900@terrainformatica.com>
To: fantasai <fantasai.lists@inkedblade.net>
CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>, www-style <www-style@w3.org>

fantasai wrote:
>> The proposal can be found here:
>> http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0019/Overview.html 
> Hi Lachlan,
> Have you considered handling these queries by passing an option
> to querySelector that scopes the selector to the context node?
> (Or in the case of HTML5 scoped style, defining a syntax for the
> style element that does the same.) What are the advantages of
> doing this with a pseudo-class instead of that approach?
> ~fantasai

Could elaborate more on what you mean?

Say you want to select immediate child of the scope root element.

   <div id=scopeRoot>

Then you would write is as:

   scopeRoot.selectChild(" > div", scopedLookup = true );


   scopeRoot.selectChild(":root > div", scopedLookup = true );

Is this what you mean?

Andrew Fedoniouk.

Received on Sunday, 13 July 2008 21:33:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC