Support dynamic import

The static `import` should be prefered over the dynamic but it might be
usefull when loading an object from a json file.
This commit is contained in:
phosit
2025-01-15 22:08:06 +01:00
committed by phosit
parent 252df0a1db
commit a40caaffc4
5 changed files with 82 additions and 9 deletions
+2
View File
@@ -102,6 +102,8 @@ private:
// Functions used by the `ScriptContext`.
[[nodiscard]] static JSObject* ResolveHook(JSContext* cx, JS::HandleValue,
JS::HandleObject moduleRequest) noexcept;
[[nodiscard]] static bool DynamicImportHook(JSContext* cx, JS::HandleValue referencingPrivate,
JS::HandleObject moduleRequest, JS::HandleObject promise) noexcept;
RegistryType m_Registry;
};