W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2007

[whatwg] Omission of frame reflection by name onto |window| in ECMAScript browsers

From: Jeff Walden <jwalden+whatwg@MIT.EDU>
Date: Fri, 06 Jul 2007 22:36:40 -0700
Message-ID: <468F2668.30703@mit.edu>
Apparently, the windows associated with frames contained within a document are added as properties to the containing document's window; the property name is the frame's name (or id, too?  I don't know), and the property value is the frame's window object.  Here's an example, since that's an unintelligible mouthful:

http://mxr.mozilla.org/mozilla/source/dom/tests/mochitest/dom-level0/test_crossdomainprops.html?force=1&raw=1

Section 4.2.4 notes that ECMAScript-enabled implementations must perform this mapping, but using numeric indexes within the document, not with their names.  I think the omission of name-based frame-window lookup is an omission, so that needs to be added.

Note that a description of this behavior should note behavior when a frame whose name is a number is contained within a document (and not at the corresponding index), e.g.:

<html>
<body>
<iframe name="1" src="..."></iframe> <!-- window[0], but is it also window[1]? -->
<iframe name="foo" src="..."></iframe> <!-- is this window[1], or only window.foo? -->
</body>
</html>

Jeff
Received on Friday, 6 July 2007 22:36:40 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:57 UTC