Re: [selectors-api2] Should we keep the queryScopedSelector methods? (was: Publishing Selectors API Level 2 as an FPWD?)

Boris Zbarsky wrote:
> That answers my complaint, but not my question: what is
> queryScopedSelector supposed to do?

When it was originally added, it was supposed to handle all of the 
pre-parsing of the selector to prepend :scope to each selector in the 
group, including handling things like ">div, +p".  But it got watered 
down a lot since then due to complaints from the CSSWG about modifying 
the selector syntax, and now it can only handle implying :scope and a 
descendant combinator.

Admittedly, that does lower its value significantly and I may end up 
just dropping it.  The only benefit it has now is that it's mildly more 
intuitive for authors, since unlike the existing non-scoped method, it 
can return siblings of the context node.

e.g.
elm.queryScopedSelectorAll(":scope+p");

But, in most cases, except where elm is in a disconnected tree, that is 
really equivalent to:

document.querySelectorAll(":scope+p", elm);

Anyway, since the CfC for FPWD has already begun, I'd rather not make 
any major changes till afterwards.  I'd also like to hear from a few 
other people on this issue.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Received on Monday, 11 January 2010 13:49:57 UTC