LibDevTools+LibWebView: Implement requests to create DOM nodes

This requires a couple of amendments to the DOM node serialization.
Namely, we need to include the HTML namespace, otherwise the context
menu item to create a new node is disabled.
This commit is contained in:
Timothy Flynn 2025-03-07 09:19:28 -05:00 committed by Andreas Kling
commit ffd48e1d45
Notes: github-actions[bot] 2025-03-08 00:27:01 +00:00
4 changed files with 54 additions and 1 deletions

View file

@ -486,6 +486,13 @@ void Application::replace_dom_node_attribute(DevTools::TabDescription const& des
});
}
void Application::create_child_element(DevTools::TabDescription const& description, Web::UniqueNodeID node_id, OnDOMNodeEditComplete on_complete) const
{
edit_dom_node(description, move(on_complete), [&](auto& view) {
view.create_child_element(node_id);
});
}
void Application::remove_dom_node(DevTools::TabDescription const& description, Web::UniqueNodeID node_id, OnDOMNodeEditComplete on_complete) const
{
edit_dom_node(description, move(on_complete), [&](auto& view) {