Opened 14 years ago

Closed 14 years ago

#4266 closed defect (wontfix)

concat handles NodeList specially (FF)

Reported by: bill Owned by: alex
Priority: high Milestone: 1.0
Component: Core Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


Not sure if this is considered a bug or not. (Feel free to close.) concat() normally combines two arrays:

>>> [1, 2, 3].concat([4, 5, 6])
[1, 2, 3, 4, 5, 6]

but for NodeList?:

[1, 2, 3].concat(dojo.query("table"))

It doesn't realize that the NodeList? is an Array and so it generates extra nesting:

[1, 2, 3, [table#source, table#continents]]

Change History (1)

comment:1 Changed 14 years ago by alex

Resolution: wontfix
Status: newclosed

The example here is the built-in Array class concat()-ing a NodeList? which is out of scope for our implementation to handle. To do so would require replacing the built-in concat() on the Array prototype (and therefore making it enumerable, I think, which is something we'll never do).

Marking wontfix.

Note: See TracTickets for help on using tickets.