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 21:46:36 +0100
Message-ID: <CADnb78geuRD-FMM6g6TLFdFFotXcaFNjYcVfj8h6tb5oq1REzw@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Jungkee Song <jungkee.song@samsung.com>, public-webapps@w3.org
On Fri, Dec 14, 2012 at 9:38 PM, Ian Hickson <ian@hixie.ch> wrote:
> Windows themselves don't "point" anywhere. There's a variety of
> relationships from Window objects to Document objects (and vice versa).
> What's the precise text or script you're asking about?

http://xhr.spec.whatwg.org/#dom-xmlhttprequest is the specification.
It defines that XHR's document is set to the document associated with
the global object of XHR's interface object when the constructor is
invoked. A piece of code was given by bz:

window.onload = function() {
  var x = new XMLHttpRequest; // what document?

This document is later used by the open() method of XHR, which also
checks it's fully active and throws an exception otherwise.

Received on Friday, 14 December 2012 20:47:08 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:50 UTC