- From: Timmy <timmywillisn@gmail.com>
- Date: Sun, 9 Jun 2013 17:34:28 -0400
- To: WebApps WG <public-webapps@w3.org>
- Message-Id: <5869DFA4-3CDD-436B-9E48-B051DE9C6625@gmail.com>
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
Received on Sunday, 9 June 2013 21:34:54 UTC