Closed Bug 792222 Opened 12 years ago Closed 12 years ago

getElementsByName is now returning a NodeList instead of an HTMLCollection

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jgriffin, Unassigned)

References

Details

getElementsByName is now returning a NodeList instead of an HTMLCollection. Similar methods (like getElementsByTagName) still return an HTMLCollection. This is breaking the Marionette test test_findelement.py:test_name. If we should change our implementation not to rely on an HTMLCollection being returned, let me know. To reproduce: use the scratchpad to execute this JS: alert(document.getElementsByName('foo')); result: [object NodeList] expected result: [object HTMLCollection]
This was a purposeful change in bug 788532. Per spec, this should be returning a NodeList. Per spec, getElementsByTagName should be returning an HTMLCollection.
Blocks: 788532
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.