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

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 UTC