W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

Re: [XHR] Constructor behavior seems to be underdefined

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 31 Mar 2012 07:09:40 -0400
Message-ID: <4F76E5F4.4050705@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: public-webapps@w3.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 3/31/12 2:15 AM, Cameron McCormack wrote:
> Boris Zbarsky:
>> 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....
> I don't have a <dfn> for it, but
> http://dev.w3.org/2006/webapi/WebIDL/#dfn-initial-object says that each
> global environment has a set of interface objects, and in
> http://dev.w3.org/2006/webapi/WebIDL/#es-platform-objects I use the term
> "associated with", but again not wrapped in a <dfn>.

Sure.  And the latter section says:

   It is the responsibility of specifications using Web IDL to state
   which global environment (or, by proxy, which global object) each
   platform object is associated with.

And my point is that the XHR spec doesn't state that.  Stating that the 
return value is associated with the same global environment as the 
constructor that was used to create it would do the trick.

On the other hand, maybe that should just be in WebIDL?  Are there use 
cases for constructors which create platform objects associated with a 
different global than the constructor itself?

Received on Saturday, 31 March 2012 11:10:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:06 UTC