Re: Publishing Selectors API Level 2 as an FPWD?

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 UTC