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 authored and phosit committed 2025-06-06 17:36:35 +02:00
1 parent 252df0a1db
commit a40caaffc4
5 files changed
+82 -9

No files matched your search

+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;
};