mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:48:12 +00:00
LibWebView+WebContent: Make the hovered node retrieval IPC async
This commit is contained in:
parent
760ba5932b
commit
1eba170d03
9 changed files with 26 additions and 12 deletions
|
@ -621,14 +621,16 @@ void ConnectionFromClient::inspect_accessibility_tree()
|
|||
}
|
||||
}
|
||||
|
||||
Messages::WebContentServer::GetHoveredNodeIdResponse ConnectionFromClient::get_hovered_node_id()
|
||||
void ConnectionFromClient::get_hovered_node_id()
|
||||
{
|
||||
i32 node_id = 0;
|
||||
|
||||
if (auto* document = page().page().top_level_browsing_context().active_document()) {
|
||||
auto hovered_node = document->hovered_node();
|
||||
if (hovered_node)
|
||||
return hovered_node->unique_id();
|
||||
if (auto* hovered_node = document->hovered_node())
|
||||
node_id = hovered_node->unique_id();
|
||||
}
|
||||
return (i32)0;
|
||||
|
||||
async_did_get_hovered_node_id(node_id);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_dom_node_text(i32 node_id, String const& text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue