`this` inside modules

Anne van Kesteren annevk at annevk.nl
Sun Jun 8 23:22:54 PDT 2014

On Mon, Jun 9, 2014 at 6:25 AM, Domenic Denicola
<domenic at domenicdenicola.com> wrote:
> The current proposal would instead create a
> world where `this` is about methods most of the time, but is a magic ambient
> variable in some cases (sloppy scripts, modules).

This also creates an ever bigger need for an external opt-in flag for
modules. E.g. making service workers use strict mode as suggested in
https://github.com/slightlyoff/ServiceWorker/issues/294 would no
longer allow us to safely upgrade them to module syntax later on. Per
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25868 it is argued that
"use modules" would be bad UX, but that seems to be exactly where this
is heading, except the syntax is outside of JavaScript.


More information about the es-discuss mailing list