mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
WebContent+WebDriver: Inform WebDriver when a window is closed from JS
This hooks into the same PageClient method that closes the UI tab after an invocation to window.close().
This commit is contained in:
parent
84df1bf585
commit
556a0936dd
Notes:
github-actions[bot]
2024-10-06 00:43:38 +00:00
Author: https://github.com/trflynn89
Commit: 556a0936dd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1644
Reviewed-by: https://github.com/shannonbooth ✅
4 changed files with 10 additions and 0 deletions
|
@ -538,6 +538,9 @@ void PageClient::page_did_close_top_level_traversable()
|
|||
// FIXME: Rename this IPC call
|
||||
client().async_did_close_browsing_context(m_id);
|
||||
|
||||
if (m_webdriver)
|
||||
m_webdriver->async_window_closed();
|
||||
|
||||
// NOTE: This only removes the strong reference the PageHost has for this PageClient.
|
||||
// It will be GC'd 'later'.
|
||||
m_owner.remove_page({}, m_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue