Re: Determining what prototype should be used for an object

On 11/17/14, 9:21 PM, Allen Wirfs-Brock wrote:
>
> On Nov 17, 2014, at 6:14 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>   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?

Er, sorry, my testcase was supposed to be:

   window2.document.createElement.call(window3.document, "foo");

running in window1.

In this case the "this" object is from window3, the function is from 
window2, and the caller of the function is in window1.

I fully expect the actual elements here to be created from window3 (this 
is one of the cases I expect are needed for web compat), but I just want 
to understand which of window1 and window2 is the "caller's Realm" in 
the IE case.

-Boris

Received on Tuesday, 18 November 2014 02:25:23 UTC