1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:04:57 +00:00

LibWeb+LibWebView+WebContent: Add an Inspector IDL object to the Window

This is an internal object that must be explicitly enabled by the chrome
before it is added to the Window. The Inspector object will be used by a
special WebView that will replace all chrome-specific inspector windows.
The IDL defines methods that this WebView will need to inform the chrome
of various events, such as the user clicking a DOM node.
This commit is contained in:
Timothy Flynn 2023-11-23 12:22:23 -05:00 committed by Andreas Kling
parent 30e96749de
commit ffdc2d8add
21 changed files with 156 additions and 1 deletions

View file

@ -402,4 +402,16 @@ void WebContentClient::did_insert_clipboard_entry(String const& data, String con
m_view.on_insert_clipboard_entry(data, presentation_style, mime_type);
}
void WebContentClient::inspector_did_load()
{
if (m_view.on_inspector_loaded)
m_view.on_inspector_loaded();
}
void WebContentClient::inspector_did_select_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement> const& pseudo_element)
{
if (m_view.on_inspector_selected_dom_node)
m_view.on_inspector_selected_dom_node(node_id, pseudo_element);
}
}