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

Re: Window pointer

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 22 Nov 2007 15:01:57 +0100
To: "Ian Hickson" <ian@hixie.ch>
Cc: "Stewart Brodie" <stewart.brodie@antplc.com>, public-webapi@w3.org
Message-ID: <op.t1649jqm64w2qv@annevk-t60.oslo.opera.com>

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 checks will fail. If anyone has suggestions on how to  
phrase that that would be welcome.

As for removing the Window object implying that the Document object is  
removed, this does not seem to be what Internet Explorer is doing per my  
testing:

   http://tc.labs.opera.com/apis/XMLHttpRequest/open/031.htm

Then again, there's no specification that I know of that defines when the  
document attribute on the Window object changes, exactly.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Thursday, 22 November 2007 14:02:14 GMT

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