#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 12 years ago by
Owner: | changed from anonymous to alex |
---|
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
As you suspected removing the QSA branch sidesteps the whole issue.
comment:3 Changed 11 years ago by
Component: | Core → Query |
---|
alex: you backed out QSA stuff, is this an issue still at all? bill?