1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +00:00

Ladybird+LibWebView: Add an Inspector action to screenshot a DOM node

This commit is contained in:
Timothy Flynn 2023-12-06 11:56:16 -05:00 committed by Andreas Kling
parent e3df035c5d
commit 71fdf0860e
7 changed files with 31 additions and 0 deletions

View file

@ -245,6 +245,15 @@ void InspectorClient::context_menu_copy_dom_node()
m_context_menu_data.clear();
}
void InspectorClient::context_menu_screenshot_dom_node()
{
VERIFY(m_context_menu_data.has_value());
m_content_web_view.take_dom_node_screenshot(m_context_menu_data->dom_node_id).release_value_but_fixme_should_propagate_errors();
m_context_menu_data.clear();
}
void InspectorClient::context_menu_remove_dom_node()
{
VERIFY(m_context_menu_data.has_value());

View file

@ -28,6 +28,7 @@ public:
void context_menu_edit_dom_node();
void context_menu_copy_dom_node();
void context_menu_screenshot_dom_node();
void context_menu_remove_dom_node();
void context_menu_add_dom_node_attribute();
void context_menu_remove_dom_node_attribute();