- From: Anne van Kesteren <annevk@opera.com>
- Date: Sat, 31 Mar 2012 10:17:32 +0200
- To: public-webapps@w3.org, "public-script-coord@w3.org" <public-script-coord@w3.org>, "Boris Zbarsky" <bzbarsky@mit.edu>
On Sat, 31 Mar 2012 01:29:05 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote: > Now consider a web page with two subframes and a script that has > references to the two subframe windows in variables w1 and w2. Then the > script does this: > > w1.XMLHttpRequest = w2.XMLHttpRequest; > var xhr = new w1.XMLHttpRequest(); > > What's the document associated with xhr? Is it w1.document, > w2.document, or window.document? The concept "the Window object for > which the XMLHttpRequest interface object was created" doesn't seem to > be defined anywhere.... So this was defined this way the last time you brought this up. I believe it should be w2.document which is different from how most constructors behave (e.g. Image), because that is what IE does and you wanted to be compatible with that. The testsuite does not test w1.XMLHttpRequest = w2.XMLHttpRequest explicitly, because nothing should happen there except referencing the interface object from elsewhere. It does test constructing an interface object from a different window and then checking how URLs resolve. See the multi-window tests. -- Anne van Kesteren http://annevankesteren.nl/
Received on Saturday, 31 March 2012 08:18:04 UTC