[HTMLCollection] an error in approved TC?

Hi,

In the following approved TC, I found an assertion that needs review:
http://w3c-test.org/html/tests/approved/the-elements-of-html/forms/the-form-
element/form-elements-matches.html

var form = document.getElementById("form");
var i = document.createElement("input");
i.name = "2";
form.appendChild(i);

assert_equals(form.elements["2"], undefined, '["2"]');

Shouldn't the above assertion rather be:
assert_equals(form.elements["2"], i, '["2"]');

See the definition of HTMLCollection:
http://dom.spec.whatwg.org/#interface-htmlcollection


--
Jungkee Song
Samsung Electronics

Received on Tuesday, 6 August 2013 13:32:00 UTC