> So both the moda.js and modb.js source files can contain (for example):
> ModUtils.myfunc();
> 
> And can import the exports of ModUtils:
> import ModUtils.myfunc;
> myfunc();

Yes.

> Is it correct that a module declaration within a script tag only has
> scope within that script tag?

No, each script is in scope for subsequent scripts. (The section "Top Level" in 
the strawman is the relevant part.) One of the enhancements to the current 
proposal, which we've considered but not worked out in detail, would be the 
ability to create private modules.

Dave

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to