I get a nodeList from getElementsByName, getElementsByTagName, etc. I then want to step through the list. In IE and Firefox, I can use a for...in statement to step through the nodeList as an array. However, in Safari and latest Nightly of WebKit, the for...in statement does nothing. Silently. (Not sure whether this should be in Javascript or HTML DOM.)
Created attachment 7392 [details] Sample page demonstrating both broken and working methods of stepping through nodeList.
Please note the values that get enumerated by for...in in Firefox: {0, 1, 2, 3, 4, length, item, namedItem}. In TOT WebKit, we get just {length, item}. So, while WebKit may have a problem with property enumeration, this doesn't look like a valid way to iterate a NodeList.
The thing I can confirm is that typeof(SomeObject.getElementsByTagName('sometag')) is 'function' instead of an 'object'. Confirmed on Safari 2.0.4 and nightly 19940.
*** Bug 17137 has been marked as a duplicate of this bug. ***
NodeList, HTMLCollection and StyleSheetList are also affected by this. See bug 17137 for more info.
Created attachment 18948 [details] patch
Comment on attachment 18948 [details] patch r=me
Landed in r30034.