Support the import.meta property

Through the `import.meta` property the engine can pass some values to
the module. Currently only the `path` of the script file is exposed.
This commit is contained in:
phosit
2025-01-15 22:15:08 +01:00
committed by phosit
parent a40caaffc4
commit d76e107dca
5 changed files with 52 additions and 0 deletions
+2
View File
@@ -100,6 +100,8 @@ public:
private:
// Functions used by the `ScriptContext`.
[[nodiscard]] static bool MetadataHook(JSContext* cx, JS::HandleValue privateValue,
JS::HandleObject metaObject) noexcept;
[[nodiscard]] static JSObject* ResolveHook(JSContext* cx, JS::HandleValue,
JS::HandleObject moduleRequest) noexcept;
[[nodiscard]] static bool DynamicImportHook(JSContext* cx, JS::HandleValue referencingPrivate,