WICG / import-maps

How to control the behavior of JavaScript imports
https://html.spec.whatwg.org/multipage/webappapis.html#import-maps
Other
2.65k stars 69 forks source link

Fire a load event or an error event when the script element of the import map is from an external file? #275

Closed allstarschh closed 2 years ago

allstarschh commented 2 years ago

Given that external import map isn't supported yet.

The spec: https://wicg.github.io/import-maps/#register-an-import-map

If element is from an external file, then fire an event named load at element.

Is it intended to fire a "load" event here or actually it should be an "error" event here?

domenic commented 2 years ago

It is intended to fire load. It's just that the line there will never trigger in current implementations.

allstarschh commented 2 years ago

Thanks for the clarification.