1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibJS: Implement the ImportMeta MetaProperty

This "standard" implementation of this is to do nothing.
This commit is contained in:
davidot 2022-01-18 19:40:43 +01:00 committed by Linus Groh
parent 7cbf4b90e8
commit 91b3e5b31f
2 changed files with 49 additions and 2 deletions

View file

@ -81,6 +81,13 @@ VM::VM(OwnPtr<CustomData> custom_data)
return finish_dynamic_import(move(referencing_script_or_module), specifier, promise_capability, promise);
};
host_get_import_meta_properties = [&](SourceTextModule const&) -> HashMap<PropertyKey, Value> {
return {};
};
host_finalize_import_meta = [&](Object*, SourceTextModule const&) {
};
#define __JS_ENUMERATE(SymbolName, snake_name) \
m_well_known_symbol_##snake_name = js_symbol(*this, "Symbol." #SymbolName, false);
JS_ENUMERATE_WELL_KNOWN_SYMBOLS