Gavin Kistner wrote:
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");

I added an explicit statement after the example to say that the order of the selectors used doesn't have any effect and provided an additional example with them reversed.

You can review the changes in the latest editor's draft.

http://dev.w3.org/2006/webapi/selectors-api/

Please let me know whether or not you are satisfied with this response.

--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Reply via email to