Re: [selectors-api] Matching subtrees or not

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 UTC