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

Re: [XHR] Constructor behavior seems to be underdefined

From: Adam Barth <w3c@adambarth.com>
Date: Tue, 3 Apr 2012 23:21:21 -0700
Message-ID: <CAJE5ia-8JBxnOLd-EHPB88BeXYaA91gLBCv_ihQBTO-O4_wrwA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Cameron McCormack <cam@mcc.id.au>, Ian Hickson <ian@hixie.ch>, Simon Pieters <simonp@opera.com>, public-webapps@w3.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Mon, Apr 2, 2012 at 5:27 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 4/2/12 6:46 PM, Cameron McCormack wrote:
>>
>> Boris Zbarsky:
>>>
>>> And just to be clear, the discussion about security and document.domain
>>> is somewhat orthogonal to the original issue. WebIDL requires that all
>>> objects be associated with a particular global and that any spec
>>> defining anything that creates an object needs to define how this
>>> association is set up. For the particular case of constructors, that
>>> means that either WebIDL needs to have a default (that particular specs
>>> may be able to override) or that any spec that uses constructors needs
>>> to explicitly define the global association (which is not quite
>>> identical to things like which origin and base URI are used).
>>
>> Would it make sense to require objects that are returned from a
>> constructor be associated with the same global that the constructor
>> itself is?
>
> That seems like the simplest approach to me, yes.  It's what Gecko does in
> practice anyway at the moment, afaict.

Note: WebKit has bugs in this regard, but we've been (slowly!)
converging towards Gecko's behavior, which we believe is aesthetically
correct.

Adam
Received on Wednesday, 4 April 2012 06:22:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC