jorendorff / js-loaders

Pseudoimplementation of the proposed ES6 module loaders.
54 stars 7 forks source link

Loader.prototype.load doesn't check GetOrCreateLoad #59

Closed guybedford closed 10 years ago

guybedford commented 10 years ago

This will cause a TypeError:

  // preload jquery
  System.load('jquery');

  // preload jquery again (just in case)
  System.load('jquery');
  // -> TypeError!
guybedford commented 10 years ago

Note that this is a valid use case, because I might want to attach any number of load callbacks knowing when a tree has loaded, without necessarily executing.

guybedford commented 10 years ago

Duplicate.