[Bug 22328] New: HTMLAllCollection.namedItem doesn't match reality

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22328

            Bug ID: 22328
           Summary: HTMLAllCollection.namedItem doesn't match reality
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: travil@microsoft.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

This test case fails in all browsers that support document.all today (used to
work in IE7, but IE8 changed behavior to be interoperable. The spec should be
updated to match today's reality :-)

I think the current behavior is that of the generic HTMLCollection.namedItem.


<!DOCTYPE HTML>
<html>
 <head>
  <title>collection.namedItem(name or id) returns collection of items with name
or id</title>
  <link rel="help"
href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#htmlallcollection"
/>
  <script type="text/javascript">
 window.onload = function () {
    try {
       if (2 == document.all.namedItem("myelem").length) {
          document.getElementById("testresult").innerHTML = "Pass";
       }
    } catch (ex) {
       document.getElementById("testresult").innerHTML = "Fail";
    }
 }
  </script>
 </head>
 <body>
  <p>Description: Verify the collection of items with given name is returned
(namedItem)</p>
  <p>Test passes if the word "Pass" appears below.</p>
  <a style="visibility: hidden" name="myelem"></a>
  <a style="visibility: hidden" id="myelem"></a>
  <div id="testresult">Fail</div>
 </body>
</html>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 11 June 2013 17:50:41 UTC