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

Re: Publishing Selectors API Level 2 as an FPWD?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 11 Jan 2010 00:19:28 -0500
Message-ID: <4B4AB4E0.7030406@mit.edu>
To: Sean Hogan <shogun70@westnet.com.au>
CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>, public-webapps <public-webapps@w3.org>
On 1/10/10 11:58 PM, Sean Hogan wrote:
> Even if jQuery deprecates non-standard selectors, the current spec for
> queryScopedSelector*() doesn't support the jQuery implicitly "scoped"
> selector "> *".

As I understand it, jquery selectors on elements are always scoped in 
the sense that they behave differently from the v1 Selectors API.  In 
particular, if I understand correctly, the behavior of:

   element.querySelector("body div")

in matching all <div>s that are descendants of |element| and also 
descendants of a <body> (which may be an _ancestor_ of |element|) is 
different from the selector behavior in jquery.

Or did I understand incorrectly?

All that said, I just read the draft at 
http://dev.w3.org/2006/webapi/selectors-api2/ and I can't make heads or 
tails of either what the new arguments to querySelector(All) are 
supposed to mean (are they just an enumaration of the things :scope is 
allowed to match during the selector evaluation?) or what 
queryScopedSelector(All) is supposed to do.  Am I just missing 
something?  Am I reading the wrong draft?

(I'd link to the "dated" version of the draft, in case it changes, but 
that link is broken, sadly.)

> In the following forms :scope is misleading:
>
> element.queryScopedSelector(":scope + *")
> element.queryScopedSelector(":scope ~ *")
>
> and especially:
>
> element.querySelector("* :scope *", refNode)

Can't exactly comment on this given the above....

-Boris
Received on Monday, 11 January 2010 05:20:04 GMT

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