mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
WebContent: Allow pop-ups when WebDriver is connected
Currently we have `m_should_block_pop_ups` set to true by default which means `choose_a_browsing_context` will early return if new top-level browsing context is requested and write `Pop-up blocked!` in console. It is good but when WebDriver is connected we want it to be able to actually open a new window if one is requested.
This commit is contained in:
parent
126fa7df14
commit
bb98ae08b8
Notes:
sideshowbarker
2024-07-17 03:19:14 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/bb98ae08b8 Pull-request: https://github.com/SerenityOS/serenity/pull/17855 Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 3 additions and 0 deletions
|
@ -324,6 +324,9 @@ ErrorOr<NonnullRefPtr<WebDriverConnection>> WebDriverConnection::connect(Web::Pa
|
|||
dbgln_if(WEBDRIVER_DEBUG, "Trying to connect to {}", webdriver_ipc_path);
|
||||
auto socket = TRY(Core::LocalSocket::connect(webdriver_ipc_path));
|
||||
|
||||
// Allow pop-ups, or otherwise /window/new won't be able to open a new tab.
|
||||
page_client.page().set_should_block_pop_ups(false);
|
||||
|
||||
dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver");
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(move(socket), page_client));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue