W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > July 2012

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

From: <bugzilla@jessica.w3.org>
Date: Sat, 07 Jul 2012 15:47:46 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-17712-2486@http.www.w3.org/Bugs/Public/>
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 the QA contact for the bug.
Received on Saturday, 7 July 2012 15:47:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 7 July 2012 15:47:47 GMT