Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8074 closed defect (fixed)

IE8: NodeList.html / concat() unit test failure (dojo.query problem)

Reported by: bill Owned by: alex
Priority: high Milestone: 1.3
Component: Query Version: 1.2.1
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.query() on IE8 will sometimes directly return result from querySelectorAll(), a StaticNodeList (builtin type).

This array-like type has certain limitations, namely that when passed to concat(), it isn't treated as an array. The code below will return an array of StaticNodeLists, rather than an array of nodes:

[].concat(document.querySelectAll("*"), document.querySelectAll("*"))

This is the root cause of the failure in the NodeList.html/concat() unit test, and it is of course breaking NodeList.concat() in general.

Could change NodeList.concat() to handle this. However, our users may be depending on dojo.NodeList having all the array properties. I.E., users may directly be doing something like

[].concat(dojo.query("..."), dojo.query("..."));

I suggest that dojo.query() should _zip up all it's responses (ie, copy them to a real array).

Change History (3)

comment:1 Changed 10 years ago by dante

Owner: changed from anonymous to alex

alex: you backed out QSA stuff, is this an issue still at all? bill?

comment:2 Changed 10 years ago by bill

Resolution: fixed
Status: newclosed

As you suspected removing the QSA branch sidesteps the whole issue.

comment:3 Changed 10 years ago by bill

Component: CoreQuery
Note: See TracTickets for help on using tickets.