W3C home > Mailing lists > Public > public-webapi@w3.org > November 2007

Re: Window pointer

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 26 Nov 2007 10:47:39 +0100
To: "Subbu Allamaraju" <subbu.allamaraju@gmail.com>
Cc: "Ian Hickson" <ian@hixie.ch>, "Stewart Brodie" <stewart.brodie@antplc.com>, public-webapi@w3.org
Message-ID: <op.t2d75p1e64w2qv@annevk-t60.oslo.opera.com>

On Mon, 26 Nov 2007 05:14:09 +0100, Subbu Allamaraju  
<subbu.allamaraju@gmail.com> wrote:
> On Nov 22, 2007, at 6:01 AM, Anne van Kesteren wrote:
>> On Mon, 19 Nov 2007 17:46:23 +0100, Ian Hickson <ian@hixie.ch> wrote:
>>> Careful; a Window object can point to different Document objects during
>>> its lifetime, depending on which document is active. What should happen
>>> when the original document is no longer the active document? Directly
>>> accessing window.document at that point could be across-origin error.
>>
>> Yeah. It seems that if the Document object has changed an exception is  
>> thrown in Internet Explorer. I guess I should change the definition.  
>> Basically each XMLHttpRequest object has an associated Document object.  
>> If the Document object changes this "pointer" becomes "null" and URI  
>> resolving and origin
>
> Do you mean "each _implementation_ of XMLHttpRequest has an ..."?

No, I don't think so.


> Also the following paragraph in Sec 4 in the editor's draft  
> (http://dev.w3.org/2006/webapi/XMLHttpRequest)
>
> "When the XMLHttpRequest() constructor is invoked a persistent pointer  
> to the associated Document object is stored on the newly created object.  
> This is the Document pointer. The associated Document object is the one  
> returned by the document attribute from the object on which the  
> XMLHttpRequest() constructor was invoked (a Window object). The pointer  
> can become "null" if the object is destroyed."
>
> seems to be explaining implementation behavior (with "is invoked", "is  
> stored" etc.), but not about any conformance language. I don't have any  
> suggestions, but, the point about resolving URI references seems lost.

URI resolving happens during open() method set of steps. Or do you mean  
something else? (I did change the sentence into a statement of fact,  
rather than a conformance requirement, as it can't be tested as such.)


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Monday, 26 November 2007 09:47:38 GMT

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