W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: [selectors-api] comments on Selectors API Level 2

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 20 Jan 2010 08:59:13 -0800
Message-ID: <4B573661.2030803@terrainformatica.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
CC: public-webapps@w3.org, "www-style@w3.org" <www-style@w3.org>
Daniel Glazman wrote:

>    I would recommend dropping the pseudo-class :scope and make a simpler
>    model where a fictional :scope pseudo-class and a descendant
>    combinator are prepended to all selectors passed as the argument of
>    the corresponding APIs.
> 

There are cases where you will need to match only immediate children 
using such queryScopedSelector() function.

Possible solutions:

element.$("> .child");
element.$(":root > .child");

:root here is the element itself - root of the lookup.

BTW: the name of the function queryScopedSelectorAll() has at least one 
technical and one grammatical error. Can we rename it somehow?


-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Wednesday, 20 January 2010 16:59:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT