Consider these two files: // main.js await import("./dep.js", { assert: { type: "<invalid>" } }); // dep.js console.log("Hi from dep!"); Step 6 of https://html.spec.whatwg.org/#fetch-an-import()-module-script-graph stops the import process if "type" is not a supported type assertion, so dep.js shouldn't be fetched and executed. However, WebKit ignores the "type" assertions and loads dep.js as JavaScript. Tested in Epiphani TP 43.0-12. I believe that this bug comes from the .value_or call at https://github.com/WebKit/WebKit/blob/5d0f369579801f91293bcae0845cca26c816ea44/Source/WebCore/bindings/js/ScriptModuleLoader.cpp#L318.
<rdar://problem/101166148>
Pull request: https://github.com/WebKit/WebKit/pull/5399
Committed 255574@main (902de48a7da9): <https://commits.webkit.org/255574@main> Reviewed commits have been landed. Closing PR #5399 and removing active labels.