Bug 16656
| Summary: | Acid3 expects form.elements.length == form.elements | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
Eric Seidel (no email)
// test 56: <form> and .elements
var ok = false;
test = document.getElementsByTagName('form')[0];
if (// test.elements === test || // (IE would fail this, but HTML5 might require it)
test.elements === test.getAttribute('elements') ||
test.elements.length != 1 ||
test.elements.length != test.elements)
ok = false;
if (ok)
return 4;
The only part of that test that we fail is "form.elements.length == form.elements"
I'm not sure why that would be expected. I guess HTMLCollection is supposed to have a special toNumber implementation which returns the number of elements in the collection!?
It would be nice to see a spec to back up that claim.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
http://www.whatwg.org/specs/web-apps/current-work/#htmlcollection
makes no such reference to this expected toNumber implementation.
Ian 'Hixie' Hickson
See this is why you shouldn't look at the test before it's ready. :-P
It was supposed to test form.elements.length == form.length. Fixed the test. :-)