treated as a module if ...
erik.arvidsson at gmail.com
Sun Jul 5 15:41:18 UTC 2015
No. This all comes down how the file is evaluated and that is determined
whether the file is treated as Script  or Module . Modules are always
strict and Script is sloppy unless it starts with a use strict directive.
Traditionally all source files have been treated as Script but in ES'15 we
provide another hook for the embedder to invoke which allows the source
file to be treated as a Module . The idea is that the module loader spec
 will use this hook.
On Sun, Jul 5, 2015 at 9:38 AM Mark Volkmann <r.mark.volkmann at gmail.com>
> Thanks for the quick reply! Does this mean that a file that contains
> imports, but no exports, is not by default evaluated in strict mode?
> On Sun, Jul 5, 2015 at 8:27 AM, Erik Arvidsson <erik.arvidsson at gmail.com>
>> d. If a source file is imported it is parsed using the Module production.
>> On Sun, Jul 5, 2015, 09:03 Mark Volkmann <r.mark.volkmann at gmail.com>
>>> Fill in the blank.
>>> In ES 2015, a JS source file is treated as a module if _____.
>>> a. it exports anything
>>> b. it imports anything
>>> c. both a and b
>>> d. something else
>>> R. Mark Volkmann
>>> Object Computing, Inc.
>>> es-discuss mailing list
>>> es-discuss at mozilla.org
> R. Mark Volkmann
> Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss