[selectors-api] QSA and findAll definitions

The wording of the QSA and findAll definitions are a bit confusing to me. Forgive me if I'm misunderstanding, but the definitions for querySelector[All] and find[All] seem to be partly reversed.

First, the definition of subtrees seems clear enough:
"The term subtrees refers to the set of elements that are descendants of the specified context object."

However, the definition for querySelector currently states: "return the first matching Element node within the subtrees of the context object". Isn't that the definition for find? Element#querySelector does not limit matching to subtrees of the context object. `elem.querySelector("div")` will return all divs on the page, not just descendants of `elem`. I assume this was not meant to be changed here.

find states: "return the first matching Element node from the tree within which the context object is located". This sounds just like what querySelector is supposed to do. Element#querySelector returns results based off of the tree in which the element is located.


- Timmy

Received on Sunday, 9 June 2013 21:34:54 UTC