mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 21:22:08 +00:00
Ladybird+LibWebView: Add an Inspector action to copy an attribute value
This commit is contained in:
parent
f7de1369d2
commit
51a0673b5c
7 changed files with 51 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue