The NodeList object, which is returned by element.childNodes, among other things, cannot have properties assigned to it. It also doesn't have any of the built in array functions. Firefox (and I believe Internet Explorer, but cannot test right this moment) supports adding aribtrary properties to the objects returned by element.childNodes, as well as the built in array functions on those objects. This is related to the following two bugs: http://bugs.webkit.org/show_bug.cgi?id=8080 http://bugs.webkit.org/show_bug.cgi?id=7967 These bugs note that it doesn't respond to for..in, and that similarly Collections returned from a form element can't have properties set.
Apparently the actual problem here is that every time you call element.childNodes, you get a new NodeList. So, the following will not work: element.childNodes.foo = 1; alert(element.childNodes.foo); //undefined But, this does work: var e = element.childNodes; e.foo = 1; alert(e.foo); Obviously the severity of this is significantly less now, since the alternate method is acceptable. Though it would be ideal if two immediate requests to element.childNodes returned the same list.
See also: bug 9508, bug 33696.
Looks like this one got fixed by bug 76591.
*** This bug has been marked as a duplicate of bug 76591 ***