Any news about the `<module>` element?
impinball at gmail.com
Mon Dec 22 10:17:43 PST 2014
> From: Allen Wirfs-Brock <allen at wirfs-brock.com>
> To: Anne van Kesteren <annevk at annevk.nl>
> Cc: es-discuss list <es-discuss at mozilla.org>
> Date: Sun, 21 Dec 2014 14:45:08 -0800
> Subject: Re: Any news about the `<module>` element?
> On Dec 21, 2014, at 10:10 AM, Anne van Kesteren wrote:
> > On Sun, Dec 21, 2014 at 5:42 PM, James Burke <jrburke at gmail.com> wrote:
> >> (I am
> >> sure you are aware of the coming Service Worker bliss, so not just a
> >> curious side issue):
> > I and some others have been advocating for service workers to run in
> > strict mode by default, as well as having this be undefined so they
> > could later be upgraded to be module compatible without requiring some
> > new out-of-band switch. It hasn't really gotten much traction
> > unfortunately.
> Wait a minute. "Strict mode" is not a runtime mode it is a lexical
characteristic of a JS source file (or the source code of a function). You
can this take an arbitrary JS file an say its going to be run in "strict
> You could say that the source code for a Service Worker must be a Module
(which implies that it is strict mode) even in import and export statements
aren't yet support. But this would be a bit more work for implementations
as it means that top-level module semantics (top level declarations are
module local) would have to be implemented.
A far as I know, much of the scope handling, sans strict mode, has been
implemented in Node for years, so I don't expect it would be too
extraordinarily hard to implement (particularly so for V8/consumers in this
case). I may be wrong, though.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss