Re: [SelectorsAPI] Thoughts on querySelectorAll

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.

Regards,
Maciej

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