mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
Ladybird: Handle close event in WebContentView
This commit is contained in:
parent
cc41233be4
commit
59752807c4
3 changed files with 7 additions and 0 deletions
|
@ -64,6 +64,10 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path)
|
|||
m_toolbar->addAction(m_home_action);
|
||||
m_toolbar->addWidget(m_location_edit);
|
||||
|
||||
QObject::connect(m_view, &WebContentView::close, [this] {
|
||||
m_window->close_tab(tab_index());
|
||||
});
|
||||
|
||||
QObject::connect(m_view, &WebContentView::link_hovered, [this](QString const& title) {
|
||||
m_hover_label->setText(title);
|
||||
update_hover_label();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue