mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +00:00
LibJS: Add host layering point related to modules to VM
Also make HostResolveImportedModule fail on the browser to prevent module loading for now.
This commit is contained in:
parent
0b89dbc529
commit
be9d478d92
Notes:
sideshowbarker
2024-07-17 20:28:39 +09:00
Author: https://github.com/davidot
Commit: be9d478d92
Pull-request: https://github.com/SerenityOS/serenity/pull/11957
Reviewed-by: https://github.com/emanuele6
Reviewed-by: https://github.com/linusg
3 changed files with 14 additions and 0 deletions
|
@ -241,6 +241,13 @@ public:
|
|||
|
||||
ScriptOrModule get_active_script_or_module() const;
|
||||
|
||||
Function<ThrowCompletionOr<NonnullRefPtr<Module>>(ScriptOrModule, ModuleRequest const&)> host_resolve_imported_module;
|
||||
Function<void(ScriptOrModule, ModuleRequest const&, PromiseCapability)> host_import_module_dynamically;
|
||||
Function<void(ScriptOrModule, ModuleRequest const&, PromiseCapability, Promise*)> host_finish_dynamic_import;
|
||||
|
||||
Function<HashMap<PropertyKey, Value>(SourceTextModule const&)> host_get_import_meta_properties;
|
||||
Function<void(Object*, SourceTextModule const&)> host_finalize_import_meta;
|
||||
|
||||
private:
|
||||
explicit VM(OwnPtr<CustomData>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue