[Bug 17712] New: Window name lookup algorithm is wrong for named subwindows

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

           Summary: Window name lookup algorithm is wrong for named
                    subwindows
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
        AssignedTo: ian@hixie.ch
        ReportedBy: bzbarsky@mit.edu
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Consider this testcase:

  <iframe name="bar" 
          src="data:text/html,<script>window.name='foo'</script>"></iframe>
  <script>
    window.onload = function() { 
      alert(window.foo); 
      alert(window.bar); 
    }
  </script>

This interoperably alerts a Window object and then "undefined" in Chrome,
Safari, Opera, Firefox.  IE9 seems to go the other way around: undefined and
then a window object (have to test with a second real document, afaict, because
data: doesn't work in IE9 there).

The Chrome, Safari, Opera, Firefox behavior is wrong as the spec is currently
written, since the spec only looks at name attributes on <iframe>, not at
window names.  But it sure looks pretty interoperable except for IE.

Note also that the spec as currently written would completely break child
window lookup by name in framesets, as far as I can tell, since it only
considers <iframe> and not <frame> in step 2 of "determine the value of a named
property name when the Window object is indexed for property retrieval".  I'm
100% sure this is not web-compatible.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 10 July 2012 12:06:32 UTC