HTMLSelectElement.namedItem does not take the name attribute into account

Confirmed Issue #6712791 • Assigned to Travis L.


Feb 29, 2016
This issue is public.
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce


Repro Steps:

var s = document.createElement( ‘select’ ), o;
o = document.createElement( ‘option’ );
o.setAttribute( 'name’, ‘asd’ );
s.appendChild( o );
s.namedItem( ‘asd’ );
=> null

o.setAttribute( 'id’, ‘asd’ );
s.namedItem( ‘asd’ );
=> <option id="asd" name="asd"></option>

Expected Results:

Name attribute of options is taken into account.

Actual Results:

Dev Channel specific:



0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To to “Travis L.”

      Changed Status to “Confirmed”

    • I posted this in Connect but my comment seems to have gone missing: says:

      This method first searches for an object with a matching id attribute. If a match is not found, the method searches for an object with a matching name attribute, but only on those elements that are allowed a name attribute.

      Is it possible that the name attribute is not considered to be allowed on option elements?

    • Microsoft Edge Team

      Changed Assigned To from “Travis L.” to “Steven K.”

      Changed Assigned To from “Steven K.” to “Travis L.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in