mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 11:36:22 +00:00
Browser+WebContent+WebDriver: Move Back, Forward, Refresh to WebContent
This commit is contained in:
parent
24fb7cd0ad
commit
7f142745e2
Notes:
sideshowbarker
2024-07-17 05:01:20 +09:00
Author: https://github.com/trflynn89
Commit: 7f142745e2
Pull-request: https://github.com/SerenityOS/serenity/pull/16033
Reviewed-by: https://github.com/linusg ✅
10 changed files with 77 additions and 101 deletions
|
@ -236,6 +236,18 @@ Tab::Tab(BrowserWindow& window)
|
|||
m_web_content_view->inspect_dom_tree();
|
||||
};
|
||||
|
||||
view().on_navigate_back = [this]() {
|
||||
go_back(1);
|
||||
};
|
||||
|
||||
view().on_navigate_forward = [this]() {
|
||||
go_forward(1);
|
||||
};
|
||||
|
||||
view().on_refresh = [this]() {
|
||||
reload();
|
||||
};
|
||||
|
||||
view().on_link_click = [this](auto& url, auto& target, unsigned modifiers) {
|
||||
if (target == "_blank" || modifiers == Mod_Ctrl) {
|
||||
on_tab_open_request(url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue