I was a little confused. I realized something I already knew in that 
elem.querySelector[All] does limit the matched set to the descendants of 
element, but the selector itself is not relative. Sorry about that. 


​I guess my only question now is what is the difference between the way 
.find[All] and .querySelector[All] relate to the context object? Why the 
wording difference?


Thanks again, 


- Timmy

On Sun, Jun 9, 2013 at 5:34 PM, Timmy <timmywill...@gmail.com> wrote:

> 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.
> Thanks,
> - Timmy

Reply via email to