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

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

From: Ian Davis <Ian.Davis@talis.com>
Date: Mon, 6 Mar 2006 16:30:35 -0000
Message-ID: <DD5E887552496241BC701548837A282F02C26AD7@nemo.talis.local>
To: "Anne van Kesteren" <annevk@opera.com>, "Web APIs WG \(public\)" <public-webapi@w3.org>
I've incorporated this text into the latest window draft. Hopefully I'll be able to distribute this before the call later today. I think we should say more about the window hierarchy. Also we should consider the opener property which contains the name of the window that Window.open was called on to open the current window.



-----Original Message-----
From: public-webapi-request@w3.org on behalf of Anne van Kesteren
Sent: Mon 3/6/2006 2:08 PM
To: Web APIs WG (public)
Subject: 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/>
 
To find out more about Library 2.0 and the Challenge of Disruptive Innovation, we invite you to read the latest white paper, listen to Talis' new Library 2.0 Gang podcasts and engage with us. 
Visit: www.talis.com/resources and www.talis.com/podcasts
Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.
Received on Monday, 6 March 2006 16:35:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:53 GMT