LibWeb: Add scaffold for for "execution context of a realm"

Alongside some const qualfied getters that this requires.
This commit is contained in:
Shannon Booth 2024-10-21 15:25:09 +13:00 committed by Andrew Kaster
commit 0628b74272
Notes: github-actions[bot] 2024-11-01 19:16:30 +00:00
4 changed files with 25 additions and 0 deletions

View file

@ -63,6 +63,7 @@ public:
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-target-browsing-context
JS::ExecutionContext& realm_execution_context();
JS::ExecutionContext const& realm_execution_context() const;
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-module-map
ModuleMap& module_map();
@ -135,6 +136,8 @@ private:
bool m_discarded { false };
};
JS::ExecutionContext const& execution_context_of_realm(JS::Realm const&);
RunScriptDecision can_run_script(JS::Realm const&);
bool is_scripting_enabled(JS::Realm const&);
bool is_scripting_disabled(JS::Realm const&);