Dynamic Modules Questions

Kevin Smith khs4473 at gmail.com
Wed Mar 6 06:46:31 PST 2013

(Referencing the module loaders proposal at

1)  Loaders have a "strict" flag which indicates whether code evaluated in
the Loader's context should be implicitly strict.  If modules themselves
are implicitly strict, is this flag superfluous?

2)  What is the nature of the bindings created with the Module constructor?
 In the following scenario, what is output?

    var a = 123;
    var M = new Module({ a: a });

    a = 456;
    console.log(M.a === a); // bound to "var a" or a new binding?

3) There doesn't appear to be a way to provide a dynamically created module
instance (created via the Module constructor) as the result of the fetch
hook.  My thought is that such a feature might be useful for implementing
dynamically linked binary add-on modules in server environments.


{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130306/4e6e2f1f/attachment.html>

More information about the es-discuss mailing list