1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

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.
This commit is contained in:
davidot 2022-01-19 10:26:38 +01:00 committed by Linus Groh
parent 91b3e5b31f
commit 986ad3ccf0
4 changed files with 69 additions and 29 deletions

View file

@ -0,0 +1,11 @@
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";