On Mon, 19 Nov 2007 17:46:23 +0100, Ian Hickson <[EMAIL PROTECTED]> 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/>