Allen Wirfs-Brock (2014-12-21T22:45:08.000Z)
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 mode".

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.

Allen
d at domenic.me (2015-01-05T21:11:24.068Z)
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 mode".

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.