Gavin Kistner wrote: > Section 6 states: > "The querySelector() method ... must ... return the first matching > Element node ***within the node’s subtree***." [1] That's correct. The Element must be matching, and must be inside the subtree rooted by the context node. > "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. Note that there have been proposals that the matching algorithm take the context node into account discussed in the past on this mailing list (or maybe on public-webapi). I urge you to read those threads. -BorisReceived on Wednesday, 19 November 2008 18:03:12 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:43:01 GMT