W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2008

Re: [selectors-api] Matching subtrees or not

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 21 Nov 2008 16:47:47 +0100
Message-ID: <4926D823.6080605@lachy.id.au>
To: Gavin Kistner <gavin@phrogz.net>
CC: Boris Zbarsky <bzbarsky@MIT.EDU>, public-webapps@w3.org

Gavin Kistner wrote:
> On Nov 19, 2008, at 11:02 AM, Boris Zbarsky wrote:
>> Gavin Kistner wrote:
>>> Section 6 states:
>>> "The querySelector() method ... must ... return the first matching 
>>> Element node ***within the node’s subtree***." [1]
>>> "Even though the method is invoked on an element, ***selectors are 
>>> still evaluated in the context of the entire document***.
>> This is also correct.  Determining whether an Element is matching does 
>> not use the context node in any way (modulo a possible :context 
>> selector in the future).
>> I don't see a contradiction here.
> Thank you for the confirmation that led to me re-examining what the 
> example was trying to show...
> I officially withdraw my comment.


> (Perhaps I may think of and suggest a way to make the example more clear.
> One way might be to have a unique element as a child of the receiver div,
> and select that instead of p elements.)

Could you please clarify what you mean, or, better yet, provide an 
example that you believe would be more appropriate for the spec?

Lachlan Hunt - Opera Software
Received on Friday, 21 November 2008 15:48:54 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:12 UTC