W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: [XHR] Need to define the behavior when the Window the XHR is created from does not have an associated document

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 14 Dec 2012 20:29:46 +0100
Message-ID: <CADnb78gF+jXMdz6e2Gd6CKpCaN3LD2Z=VoQXHpF9ageLwz5OgQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Ian Hickson <ian@hixie.ch>, Jungkee Song <jungkee.song@samsung.com>, public-webapps@w3.org
On Fri, Dec 14, 2012 at 7:59 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 12/14/12 1:55 PM, Anne van Kesteren wrote:
>> It seems to depend on whether or not the old Window object still has
>> an associated document. If it still points to the active document the
>> above "would work". If it points nowhere the above cannot work
>
> Well.  It depends on whether we want to use the old Window or the new one,
> for one thing....

Per Hixie the Document is associated with both the old and the new
Window. Meaning that XMLHttpRequest will function normally even though
XMLHttpRequest != window.XMLHttpRequest. Testing in Opera reveals this
to work fine.

<script>
window.onload = function() {
 document.open()
 var x = new XMLHttpRequest;
 x.open("GET", "image", false) // evil
 x.send()
 w(x.responseText)
}
</script>

(Written for Live DOM Viewer)

Given this, I think the XMLHttpRequest needs no change, although it
would probably be wise to cover this in the test suite.


-- 
http://annevankesteren.nl/
Received on Friday, 14 December 2012 19:30:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:56 GMT