diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index 20a975d9597..0c0f93be384 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -459,4 +459,9 @@ void ConnectionFromClient::set_has_focus(bool has_focus) m_page_host->set_has_focus(has_focus); } +void ConnectionFromClient::set_is_scripting_enabled(bool is_scripting_enabled) +{ + m_page_host->set_is_scripting_enabled(is_scripting_enabled); +} + } diff --git a/Userland/Services/WebContent/ConnectionFromClient.h b/Userland/Services/WebContent/ConnectionFromClient.h index abcfa96c180..f0a4a3f34b5 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.h +++ b/Userland/Services/WebContent/ConnectionFromClient.h @@ -61,6 +61,7 @@ private: virtual void set_content_filters(Vector const&) override; virtual void set_preferred_color_scheme(Web::CSS::PreferredColorScheme const&) override; virtual void set_has_focus(bool) override; + virtual void set_is_scripting_enabled(bool) override; virtual void js_console_input(String const&) override; virtual void run_javascript(String const&) override; diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index 5a23732afcc..de452262574 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -62,6 +62,11 @@ void PageHost::set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_s document->invalidate_style(); } +void PageHost::set_is_scripting_enabled(bool is_scripting_enabled) +{ + page().set_is_scripting_enabled(is_scripting_enabled); +} + Web::Layout::InitialContainingBlock* PageHost::layout_root() { auto* document = page().top_level_browsing_context().active_document(); diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h index 4aeded7d508..6ccc38d04c1 100644 --- a/Userland/Services/WebContent/PageHost.h +++ b/Userland/Services/WebContent/PageHost.h @@ -33,6 +33,7 @@ public: void set_should_show_line_box_borders(bool b) { m_should_show_line_box_borders = b; } void set_has_focus(bool); + void set_is_scripting_enabled(bool); private: // ^PageClient diff --git a/Userland/Services/WebContent/WebContentServer.ipc b/Userland/Services/WebContent/WebContentServer.ipc index b5a10d87114..a4b9b011225 100644 --- a/Userland/Services/WebContent/WebContentServer.ipc +++ b/Userland/Services/WebContent/WebContentServer.ipc @@ -44,7 +44,7 @@ endpoint WebContentServer set_content_filters(Vector filters) =| set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_scheme) =| - set_has_focus(bool has_focus) =| + set_is_scripting_enabled(bool is_scripting_enabled) =| }