On Mon, Jan 27, 2014 at 1:54 PM, Marius Gundersen <[email protected]> wrote:
> I didn't find anything in the spec on handling multiple modules with the
> same name [...]
> What should happen in such a scenario? Should existing modules be
> replaced? Should an error be thrown? How would that work with the DOM?
> Should it be a no-op, with no feedback to the user?

Before a module is ever exposed to scripts, before its module body
runs, it is first linked. This binds it permanently with the other
modules it imports.

After that, if you call loader.set(name, otherModule), that only
changes the loader's module registry. It affects future module loads.
It does not affect any modules already linked to the original module
that you replaced. It does not affect any functions from that original
module that are already on the stack.

-j
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to