Re: Global method calls

Mark Miller wrote:
> There, Boris writes:
> > Conceptually, using the global of the realm of the function involved
> > (i.e. the Chrome/Firefox/IE10 behavior) makes sense to me.
>
> Me too. This is in keeping with the spirit of lexical scoping. It is 
> as if these built-in functions have lexically captured the global of 
> the realm of their creation, and use that. Besides "throw", any other 
> answer would be too much magic and (at least) hard to explain. Also, 
> this aligns with the global capture of sloppy functions.

This is how it was back in the beginning. Function objects each had a 
"parent" internal slot referencing their global.

/be

Received on Sunday, 22 February 2015 22:45:27 UTC