multiple modules with the same name

Marius Gundersen gundersen at
Mon Jan 27 13:54:58 PST 2014

I didn't find anything in the spec on handling multiple modules with the
same name, or how to handle the redefinition of an existing module. At any
time a <script type="module" name="existing-name">export default "I just
replaced an exsting module";</script> element could be added to the dom,
which would replace an existing module. This could also happen with pure
JavaScript, by calling any of the Loader.prototype.define,
Loader.prototype.import, Loader.prototype.load or Loader.prototype.set
methods. 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?

Marius Gundersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list