1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

LibWeb: Add 'should block pop ups' user config to Page

This will also be used by the window.open algorithm steps.
This commit is contained in:
Idan Horowitz 2022-11-15 02:01:13 +02:00 committed by Linus Groh
parent ff2f31bc81
commit 798d7c6fae
3 changed files with 17 additions and 0 deletions

View file

@ -248,6 +248,10 @@ void ConnectionFromClient::debug_request(String const& request, String const& ar
m_page_host->page().set_is_scripting_enabled(argument == "on");
}
if (request == "block-pop-ups") {
m_page_host->page().set_should_block_pop_ups(argument == "on");
}
if (request == "dump-local-storage") {
if (auto* doc = page().top_level_browsing_context().active_document())
doc->window().local_storage()->dump();