mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
LibWeb+WebContent: Add query for hovered DOM node to OOPWV
This is needed for the "Inspect Element" context menu action.
This commit is contained in:
parent
3b07f49d48
commit
1ccf10789e
5 changed files with 18 additions and 0 deletions
|
@ -261,6 +261,16 @@ Messages::WebContentServer::InspectDomNodeResponse ClientConnection::inspect_dom
|
|||
return { false, "", "" };
|
||||
}
|
||||
|
||||
Messages::WebContentServer::GetHoveredNodeIdResponse ClientConnection::get_hovered_node_id()
|
||||
{
|
||||
if (auto* document = page().top_level_browsing_context().document()) {
|
||||
auto hovered_node = document->hovered_node();
|
||||
if (hovered_node)
|
||||
return hovered_node->id();
|
||||
}
|
||||
return (i32)0;
|
||||
}
|
||||
|
||||
void ClientConnection::js_console_initialize()
|
||||
{
|
||||
if (auto* document = page().top_level_browsing_context().document()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue