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

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 UTC