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:
parent
f7de1369d2
commit
51a0673b5c
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/trflynn89
Commit: 51a0673b5c
Pull-request: https://github.com/SerenityOS/serenity/pull/22186
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