W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [Selectors API 2] Is matchesSelector stable enough to unprefix in implementations?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 25 Nov 2011 14:00:17 +0100
Message-ID: <4ECF9161.9000602@lachy.id.au>
To: Sean Hogan <shogun70@westnet.com.au>
CC: public-webapps@w3.org
On 2011-11-25 00:19, Sean Hogan wrote:
> This has been raised before, but I'll restate it here.
>
> How should the selector be expanded in
> elt.findAll("div span, div :scope span")?

The implication of :scope has to be done on a per complex selector 
basis, rather than applied to the entire list.  That would be equivalent to:

elt.findAll(":scope div span, div :scope span")

> If this isn't to throw an error then a more complex definition is
> required which can apply a different rule for implying :scope in
> different parts of the selector argument. This is sure to be confusing
> for anyone reading the code.

Selectors in selector lists are always independent of each other, so 
authors who use a selector list would likely assume that one doesn't 
affect how another in the list matches.  It would seem far more 
confusing for authors to do it using the other alternatives.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Friday, 25 November 2011 13:00:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:49 GMT