Re: Determining what prototype should be used for an object

On Nov 17, 2014, at 6:14 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 11/17/14, 7:33 PM, Travis Leithead wrote:
>> FWIW:
>> 
>> In IE, we always have two Realms to use at runtime when a DOM method
>> needs to create objects: the caller’s realm (from the current call-chain
>> provided by the script engine) and the ‘this’ object’s Realm.
> 
> Travis, I just want to check on something.  If I have script in window1 that does:
> 
>  window2.document.createElement.call(window2.document)
> 
> then is the "caller's realm" in his case window1 or window2?


and what about the Realm of the createElement function?  That’s the realm that ES6 would expect to be associated with any objects allocated by createElement. 

Allen


> 
>> Our design is fairly straightforward: if we are creating DOM objects we almost
>> always use the ‘this’ object’s Realm.
> 
> OK.  What do you do in the get/createImageData testcase?
> 
> -Boris
> 

Received on Tuesday, 18 November 2014 02:21:41 UTC