Isiah Meadows (2014-12-22T18:17:43.000Z)
d at domenic.me (2015-01-05T21:12:12.488Z)
From: Allen Wirfs-Brock <allen at wirfs-brock.com> > 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. 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.