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). Nonetheless, I believe the example code could help clarify the situation further by being changed to: var x = document.querySelector("#bar, #foo"); This, along with the assertion that div#foo is the value of x, would ensure that the casual reader might not mistakenly believe that the order of selectors in a group affects the ordering of the results.Received on Wednesday, 19 November 2008 04:12:28 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:43:01 GMT