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: Sean Hogan <shogun70@westnet.com.au>
Date: Sat, 26 Nov 2011 00:34:26 +1100
Message-ID: <4ECF9962.4080600@westnet.com.au>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: public-webapps@w3.org
On 26/11/11 12:00 AM, Lachlan Hunt wrote:
> 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.

Discussion on this list has indicated that allowing explicit :scope in 
findAll() is confusing, which-ever definition is used. OTOH, there has 
been little or no confusion about how findAll() would behave if :scope 
is always implied. Do you expect the general web-dev community to be 
Received on Friday, 25 November 2011 13:34:56 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:37 UTC