1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

Ladybird+LibWebView: Add an Inspector action to copy an attribute value

This commit is contained in:
Timothy Flynn 2023-12-06 10:12:31 -05:00 committed by Andreas Kling
parent f7de1369d2
commit 51a0673b5c
Notes: sideshowbarker 2024-07-16 23:59:28 +09:00
7 changed files with 51 additions and 1 deletions

View file

@ -268,6 +268,17 @@ void InspectorClient::context_menu_remove_dom_node_attribute()
m_context_menu_data.clear();
}
void InspectorClient::context_menu_copy_dom_node_attribute_value()
{
VERIFY(m_context_menu_data.has_value());
VERIFY(m_context_menu_data->attribute.has_value());
if (m_content_web_view.on_insert_clipboard_entry)
m_content_web_view.on_insert_clipboard_entry(m_context_menu_data->attribute->value, "unspecified"_string, "text/plain"_string);
m_context_menu_data.clear();
}
void InspectorClient::load_inspector()
{
StringBuilder builder;