On 2011-06-16 19:40, Tab Atkins Jr. wrote:
I was convinced that @scoped worked exactly like this until this
thread. Apparently my previous reading of the spec was insufficiently
deep to spot the scoping/filtering difference.
FWIW, I also think that querySelector got this wrong. It should have
scoped by default, and then possibly also offered an option to filter
based on an element.
I analysed this issue in depth when I wrote Selectors API, and even
revisited it when I tried to introduce the queryScopedSelector methods.
But it doesn't work without altering the syntax of selectors, like
JQuery does, such as allowing selectors to begin with combinators and
creates other unintended side affects. I don't have time to write up a
full explanation now, but most of the rationale is somewhere in the
public-webapps archives.
--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/