Bug 16656

Summary: Acid3 expects form.elements.length == form.elements
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: DOMAssignee: 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)
Reported 2007-12-28 21:57:39 PST
// 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
Eric Seidel (no email)
Comment 1 2007-12-28 21:59:16 PST
http://www.whatwg.org/specs/web-apps/current-work/#htmlcollection makes no such reference to this expected toNumber implementation.
Ian 'Hixie' Hickson
Comment 2 2007-12-28 22:37:38 PST
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. :-)
Note You need to log in before you can comment on or make changes to this bug.