W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: [XHR] Constructor behavior seems to be underdefined

From: Simon Pieters <simonp@opera.com>
Date: Mon, 02 Apr 2012 06:58:47 +0200
To: "Cameron McCormack" <cam@mcc.id.au>, "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: public-webapps@w3.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <op.wb4f39quidj3kv@simons-macbook-pro.local>
On Sat, 31 Mar 2012 13:09:40 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> 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?

I believe some things in the HTML spec uses the entry script, at least for  
the purpose of choosing origin or base URL. For instance: WebSocket,  

Simon Pieters
Opera Software
Received on Monday, 2 April 2012 04:59:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:33 UTC