Re: Window pointer

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

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.

Subbu

Received on Monday, 26 November 2007 04:14:19 UTC