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

preparation-time document check should be done first at #register-an-import-map #276

Closed hiroshige-g closed 1 year ago

hiroshige-g commented 2 years ago

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

Currently preparation-time document check is done at Step 6, but to align with https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block, the check should be before firing error event at Step 1.

(This is a quite low-priority issue found during Chromium implementation investigation for an unrelated non-import-map issue. I'll create a PR/impl fix when I have a spare bandwidth)

domenic commented 2 years ago

In my HTML spec PR I am directly using "execute a script element", so I hope this is fixed. Please check when I send that out for review.

domenic commented 2 years ago

I believe this is fixed in https://github.com/whatwg/html/pull/8075. Please check. If so, I will close this when I remove all spec text from this repository and instead let HTML be the new source of truth.