Bug 261377

Summary: Propagate active script for import() through setTimeout and other string evaluators
Product: WebKit Reporter: Domenic Denicola <d>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cdumez, karlcow, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Domenic Denicola 2023-09-09 15:01:51 PDT
See various string-compilation-* tests at https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/module/dynamic-import?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&q=%2Fhtml%2Fsemantics%2Fscripting-1%2Fthe-script-element%2Fmodule%2Fdynamic-import%2F , plus the new one I'm adding at https://github.com/web-platform-tests/wpt/pull/41895 .

The basic goal is that things like

eval(`import("./some-relative-url.mjs")`);

or

setTimeout(`import("./some-relative-url.mjs")`);

should behave the same as

import("./some-relative-url.mjs");
Comment 1 Radar WebKit Bug Importer 2023-09-10 18:24:09 PDT
<rdar://problem/115264021>