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]
That's correct. The Element must be matching, and must be insid
On Nov 18, 2008, at 9:32 PM, Gavin Kistner wrote:
I find these names rather cumbersome and not very self-explanatory.
Though it may be far too late for this suggestion, I would suggest
that they should be something such as:
findNode()/findNodes() or findNode()/findAllNodes()
selectNode
I find these names rather cumbersome and not very self-explanatory.
Though it may be far too late for this suggestion, I would suggest
that they should be something such as:
findNode()/findNodes() or findNode()/findAllNodes()
selectNode()/selectNodes() or selectNode()/selectAllNodes()
findBy
Section 6 states:
"The querySelector() method ... must ... return the first matching
Element node ***within the node’s subtree***." [1]
"The querySelectorAll() method ... must ... return ... all of the
matching Element nodes ***within the node’s subtree***..." [2]
(Emphasis mine.)
In confli
On Nov 18, 2008, at 9:04 PM, Gavin Kistner wrote:
I recommend specifying a new derivative StaticNodeList type as the
return value. I do not recommend using an actual live NodeList, as I
agree with both the end-user usefulness and performance benefits of
not having a live NodeList
The second example in section 8 uses the following code:
var x = document.querySelector("#foo, #bar");
It goes on to rather explicitly state, "In the sample document above,
it would select the div element with the ID of foo because it is first
***in document order***" (my emphasis).
None
DOM Level 2 Core and DOM Level 3 Core both say:
"The NodeList interface provides the abstraction of an ordered
collection of nodes, without defining or constraining how this
collection is implemented. NodeList objects in the DOM are live." [1]
[2]
" NodeList and NamedNodeMap objects in th
The Selectors API document, section 8, has this example code:
var div = document.getElementById("bar");
var p = bar.querySelector("body p");
I assume that is supposed to be either...
var div = document.getElementById("bar");
var p = div.querySelector("body p");
...or...
var bar = docum