W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

ACTION-61: text for Window and ReferencingElement

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 20 Mar 2006 20:03:01 +0100
To: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.s6p67bap64w2qv@id-c0020.oslo.opera.com>

More improved text:

An element that refers to another document that is then embedded is called  
a <dfn>referencing element</dfn>. A document such an element points to is  
called a <dfn>child document</dfn>. Seen from a child document, the  
referencing element is part of a <dfn>parent document</dfn>. When a  
document has no referencing element that points to it the document is a  
<dfn>root document</dfn>. A document can be both a parent document and  
child document at the same time.

<code>Window.frameElement</code> from a child document MUST reflect the  
referencing element or <code>null</code> if there is no such element.  
<code>Window.parent</code> MUST reflect the parent document  
<code>Window</code> object or <code>Window.window</code> if there is no  
such document. <code>Window.top</code> MUST reflect the root document  
<code>Window</code> object. Some language specific bindings allow these  
DOM attributes, even though readonly, to be set to different values. In  
such cases the attributes simply reflect the values set by the script  

ISSUE: This does not deal with security. Security should probably be taken  
care of in a separate part of the specification. That way these attributes  
are not restricted by design, but by security environment.

<code>Window.name</code> MUST reflect the name assigned by the referencing  
element, the empty string if there is no such element or a value set by  
the script author. How this name is extracted from the referencing element  
is language specific.

ISSUE: Perhaps mention that it can be set by Window.open() and the  
"target" attribute in some language.

For example, if you have &lt;object data="<var>file</var>" id="test"/&gt;  
in an XHTML document the <code>window.name</code> DOM attribute within  
<var>file</var> will be "test".

<code>ReferencingElement.contentDocument</code> MUST reflect the child  
document <code>Document</code> object or <code>null</code> if there is no  
such object. Likewise <code>ReferencingElement.contentWindow</code> MUST  
reflect the child document <code>Window</code> object or <code>null</code>  
if there is no such object.

Anne van Kesteren
Received on Monday, 20 March 2006 19:03:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC