mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 20:16:02 +00:00
Browser+LibWebView: Add a Tab hook to take a screenshot
This commit is contained in:
parent
819598aecf
commit
d603585802
Notes:
sideshowbarker
2024-07-17 04:52:09 +09:00
Author: https://github.com/trflynn89
Commit: d603585802
Pull-request: https://github.com/SerenityOS/serenity/pull/15890
Reviewed-by: https://github.com/linusg
4 changed files with 14 additions and 0 deletions
|
@ -583,6 +583,10 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
return active_tab().view().get_session_storage_entries();
|
||||
};
|
||||
|
||||
new_tab.on_take_screenshot = [this]() {
|
||||
return active_tab().view().take_screenshot();
|
||||
};
|
||||
|
||||
new_tab.webdriver_endpoints().on_get_document_element = [this]() {
|
||||
return active_tab().view().get_document_element();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue