tmpvar/jsdom — pull request #700 by PavelVanecek (2013-11-21 11:28:39+00:00)
Title: added failing test on form.elements

form.elements[name] property should return array (or array-like list), if the name is provided by more elements (e. g. radio buttons). However, it does not.
Test case that exposes this behaviour has been added.

I used a simple script to test the implementation across browsers, it works the same as far back as IE 5 compatibility mode:
http://jsfiddle.net/nP3SB/1/

I wasn't able to find the code that handles this, so I couldn't fix it myself.

The DOM 2 HTML document states that the namedItem method should return either Node or null: http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-75708506, however all the browsers I could find and test do return array if there are duplicate names.

W3C document that handles the elements property with duplicate names behaviour can be found under html5 namespace: http://www.w3.org/TR/html5/forms.html#dom-form-elements