LibWeb: Fire "mousedown" and "mousemove" events in the DOM :^)

This commit is contained in:
Andreas Kling 2020-03-18 15:28:22 +01:00
commit e265058768
Notes: sideshowbarker 2024-07-19 08:15:27 +09:00
3 changed files with 28 additions and 6 deletions

View file

@ -184,6 +184,7 @@ void HtmlView::mousemove_event(GUI::MouseEvent& event)
#endif
is_hovering_link = true;
}
const_cast<Node*>(node)->dispatch_event("mousemove");
}
if (m_in_mouse_selection) {
layout_root()->selection().set_end({ result.layout_node, result.index_in_node });
@ -234,6 +235,7 @@ void HtmlView::mousedown_event(GUI::MouseEvent& event)
m_in_mouse_selection = true;
}
}
const_cast<Node*>(node)->dispatch_event("mousedown");
}
}
if (hovered_node_changed)