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.


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

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

Where is the problem?

Lachlan Hunt - Opera Software
Received on Monday, 14 July 2008 17:07:32 UTC

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