On Thu, 22 Nov 2007, Anne van Kesteren wrote: > > 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.
Document objects don't change; if we kept a reference to a Document then it would always be unambiguous. I actually think that's probably the better solution. Alternatively, we could keep a reference to both a Document and a Window and always check that the Document is the current Window.document. > 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. HTML5 does. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
