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

Re: Opera's Proposal for :context Selector

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 14 Jul 2008 19:06:51 +0200
Message-ID: <487B87AB.9040607@lachy.id.au>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: www-style <www-style@w3.org>

Andrew Fedoniouk wrote:
> If your goal to implement scoped lookup then your
> 
> :context/:scope elements are *mutually exclusive* with the :root.
> 
> Either one shall appear in the selector. Appearance of both will
> make selector always invalid. With only one obvious exception.

What?  I do not understand how you have reached that incorrect 
conclusion.  You seem to be a little confused.

> foo.querySelector(":root :scope div")
> 
> will simply not work.

Yes it will.

Consider:

document.body.querySelector(":root :context div");

<html> <!-- Matches :root -->
   <body> <!-- Matches :context -->
     <div>...</div> <!-- Matches div -->
   </body>
</html>

Where is the problem?

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Monday, 14 July 2008 17:07:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT