ladybird/Userland/Libraries/LibJS/Tests/builtins/ShadowRealm/async-module.mjs
davidot 986ad3ccf0 LibJS: Use HostImportModuleDynamically in ShadowRealmImportValue
Now that module loading is implemented this just works :^).

Since ShadowRealm explicitly passed a null ScriptOrModule we attempt to
get the top most ScriptOrModule in HostImportModuleDynamically.
This won't work in general as the web specifies other behavior but for
LibJS there must always be an active script to call
HostImportModuleDynamically.
2022-01-22 01:21:18 +00:00

11 lines
181 B
JavaScript

await Promise.resolve(0);
export const foo = "Well hello async shadows";
await 1;
export default "Default export";
await Promise.resolve(2);
export const bar = "'bar' export";