W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

Re: [selectors-api] Why no querySelector(All) on DocumentFragments?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sat, 15 Mar 2008 02:07:16 +0100
Message-ID: <47DB2144.5040708@lachy.id.au>
To: Anne van Kesteren <annevk@opera.com>
Cc: Maciej Stachowiak <mjs@apple.com>, Jonas Sicking <jonas@sicking.cc>, Boris Zbarsky <bzbarsky@mit.edu>, "Web APIs WG (public)" <public-webapi@w3.org>

Anne van Kesteren wrote:
> If :scope needs to work matching in implementations might need to change 
> by the way. Currently matching is only against the subtree. So 
> <div>.querySelector("div") would only match descendant <div> elements.

That just means that it will only return elements that are descendants, 
but selects are still evaluated in the context of the entire tree.


won't return anything, since the the selecor is referring to the element 
itself and is therefore quite a useless thing to do, but:


will return only span elements that are children of that div element.

Lachlan Hunt - Opera Software
Received on Saturday, 15 March 2008 01:07:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:25 UTC