W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

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

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 11 Jan 2010 14:49:22 +0100
Message-ID: <4B4B2C62.2060608@lachy.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: public-webapps <public-webapps@w3.org>
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.


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
Received on Monday, 11 January 2010 13:49:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:04 UTC