No. This all comes down how the file is evaluated and that is determined whether the file is treated as Script [1] or Module [2]. 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 [3]. The idea is that the module loader spec [4] will use this hook.
[1] http://ecma-international.org/ecma-262/6.0/#sec-scripts [2] http://ecma-international.org/ecma-262/6.0/#sec-modules [3] http://ecma-international.org/ecma-262/6.0/#sec-toplevelmoduleevaluationjob [4] http://whatwg.github.io/loader/ HTH, Erik On Sun, Jul 5, 2015 at 9:38 AM Mark Volkmann <[email protected]> wrote: > 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 <[email protected]> > wrote: > >> d. If a source file is imported it is parsed using the Module production. >> >> On Sun, Jul 5, 2015, 09:03 Mark Volkmann <[email protected]> >> wrote: >> >>> 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 >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> > > > -- > R. Mark Volkmann > Object Computing, Inc. >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

