Re: Opera's Proposal for :context Selector

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 UTC