Re: ACTION-61: text for embedding part of the Window object

Hi Boris,

Your comments are much appreciated! Commented below on your comments.  
Here's some new text to shoot on:

===
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 Window object  
or <code>null</code> if there is no such document. <code>Window.top</code>  
MUST reflect the root document Window object. Using  
<code>Window.top</code> within the root document makes no difference.  
Implementations MAY throw for any of these attributes for security  
reasons. Some language specific bindings allow these DOM attributes, even  
though readonly, to be set to different values. In such cases UAs reflect  
the values set by the script author.

ISSUE: Because implementations MAY throw the MUST should probably be  
SHOULD...

<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()?

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".
===


On Sun, 05 Mar 2006 19:57:05 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> "An element"?  Or is there only one in the universe?  This applies to a  
> lot of the articles in this first paragraph.

Hopefully fixed now.


>> <code>window.frameElement</code> from a child document MUST reflect the  
>> referencing element.
>
> Generally speaking subject to security restrictions, right?  As in, the  
> getter should be allowed to throw a security error instead, imo.

Mentioned that although I'm not sure if that should be hardcoded in the  
specification. Perhaps I should drop that line, make it a should and add  
some information on security somewhere.


>> <code>window.parent</code> MUST reflect the parent document Window  
>> object.
>
> Even if script has modified it?  Note that script can change the  
> "parent" propert of a window.

According to the bindings Maciej came up with that's probably ECMAScript  
specific, added some wording to that effect.


> Under what circumstances would there be no root document?  And again,  
> how does that interact with scripts setting Window.top and Window.parent?

Fixed this.


>> <code>window.name</code> from a child document MUST initially reflect  
>> the name assigned by the referencing element.
>
> What does "from a child document" mean here?  Also, what does  
> "initially" mean?

Fixed this too.


>> If there is no referencing element this attribute MUST be the empty  
>> string.
>
> That doesn't work for window.open() and <a target> at the very least.

How can it be set by <a target>?


>> The document itself can change its name by changing  
>> <code>window.name</code> to any arbitrary string.
>
> The document doesn't change its name; it changes the window's name.   
> That is, the name change outlives the document.

Fixed.


>> 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" initially.
>
> I'm still not clear on what "initially" means.

Dropped it.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 6 March 2006 14:08:47 UTC