W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

Re: Global method calls

From: Mark Miller <erights@gmail.com>
Date: Sun, 22 Feb 2015 14:14:10 -0800
Message-ID: <CAK5yZYiY4496WrtXdff+dFc8yw6OXfYW_QiPGjku-YAS=aZcZQ@mail.gmail.com>
To: Domenic Denicola <d@domenic.me>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>, "es-discuss@mozilla.org" <es-discuss@mozilla.org>
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.

On Sun, Feb 22, 2015 at 2:05 PM, Domenic Denicola <d@domenic.me> wrote:

> From: Mark Miller [mailto:erights@gmail.com]
> > "the ECMAScript global object"? Which one? (Even if it is clear from
> context, please assume I do not have that context.)
> Heh; good catch. A contemporary thread to my [1] is
> https://lists.w3.org/Archives/Public/public-script-coord/2013JulSep/0658.html,
> which debates that very question.

Text by me above is hereby placed in the public domain

Received on Sunday, 22 February 2015 22:14:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:23 UTC