W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: [SelectorsAPI] Thoughts on querySelectorAll

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 1 May 2008 22:19:24 -0700
Cc: public-webapi@w3.org
Message-Id: <61987EC7-AC65-4EFF-845A-6F355A969185@apple.com>
To: John Resig <jresig@mozilla.com>

On Apr 30, 2008, at 1:37 PM, John Resig wrote:

> * Combinator-rooted Queries
> I read about some prior discussion concerning this (especially in  
> relation to DOMElement.querySelectorAll-style queries). This is an  
> important part of most libraries, as it stands. Maciej's proposed  
> solution of using :root to allow for front-leading combinators is  
> perfectly acceptable to me (where :root is made equivalent to the  
> element, not the document element).

My most recent suggestion was to introduce a :scope pseudo-class for  
this instead of :root. I think this could also be used to do element  
scoped queries that work the way current JS libraries do: ":scope div  
 > span" would find only a span child of a div that is somewhere in  
the current scope.

Received on Friday, 2 May 2008 05:20:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:26 UTC