W3C home > Mailing lists > Public > public-webapps-testsuite@w3.org > August 2013

[HTMLCollection] an error in approved TC?

From: Jungkee Song <jungkee.song@samsung.com>
Date: Tue, 06 Aug 2013 22:31:30 +0900
To: public-webapps-testsuite@w3.org
Message-id: <00cc01ce92a9$4267cbb0$c7376310$@samsung.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:52:58 UTC