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.

OK.

> (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
http://lachy.id.au/
http://www.opera.com/
Received on Friday, 21 November 2008 15:48:54 GMT

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