[Bug 13776] Browser inconsistencies in implementing name getters on forms and form element collections

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13776

--- Comment #1 from Simon Pieters <simonp@opera.com> 2011-08-15 07:03:33 UTC ---
See this thread:

http://lists.w3.org/Archives/Public/public-html/2011Apr/thread.html#msg389

and Boris' followup in private email:

[[
On 7/15/11 5:33 PM, Ian Hickson wrote:
> Do you know what changes, if any, you concluded were needed to the spec

We didn't conclude anything.  We need some info from WebKit on what they're
willing to implement, and they haven't responded.

That said, I just realized that my initial testcase with IE was just broken
because it doesn't correctly implement HTML5 parsing.  A corrected testcase:

   <!DOCTYPE html>
   <body>
   <form name="x">
     <img name="y">
   </form>
   <script>
     var f = document.forms["x"];
     alert(f.y);
     alert(document.forms["x"].elements.y);
   </script>

This alerts "[object HTMLImageElement]" and "undefined" which does not match
the spec but does match Gecko and Presto (and for that first alert matches
WebKit).

So I suspect that the spec definitely needs changing here, because it's likely
to not be web-compatible.

The thing that's interoperably implemented is that form.myName will find <img>
elements with name or id "myName" inside the form.  Whatever "inside the form"
means, esp. in the tables case.  That still needs to be tested.
]]

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 15 August 2011 07:03:38 UTC