it is a module if: a) it is imported using imperative form thru a loader (with we are still working out the details) b) it is imported using declarative form (ImportDeclaration) c) future <module> tag, or <script type="module"> (still to figure).
there is an exception for these rules. if you use a loader hook to load dynamic modules, but that's about it. /caridy > On Oct 19, 2014, at 8:42 PM, Mark Volkmann <[email protected]> wrote: > > Can we say anything more concrete if we restrict the discussion to modern > browsers as opposed to non-browser ES engines? Is it fair to say that in > those environments a file will always be treated as a module if it is > imported by another file that the browser has loaded? > >> On Sun, Oct 19, 2014 at 4:47 PM, Allen Wirfs-Brock <[email protected]> >> wrote: >> >>> On Oct 19, 2014, at 2:28 PM, Mark Volkmann wrote: >>> >>>> On Sun, Oct 19, 2014 at 4:23 PM, Allen Wirfs-Brock <[email protected]> >>>> wrote: >>>> >>>> It is implementation dependent how it is determined whether an individual >>>> file will be parsed as a Script or as a Module. >>> >>> This seems problematic because it means I can't assume that strict mode >>> will be inferred. That may lead people to always specify it with 'use >>> strict'. I was hoping to not have to do that. >> >> It's not intended to be inferred. In fact, it can't necessarily be inferred >> from the source code of a module or script. The intent is that the >> designation of a source file as containing a module or script unambiguously >> communicated to the ES engine. It is the manner in which that is >> communicated which is be implementation or host environment determined. >> >> Allen > > > > -- > R. Mark Volkmann > Object Computing, Inc. > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

