LibWeb+LibWebView+WebContent: Add an Inspector IPC to execute JavaScript

The Inspector will have an <input> element to execute user-provided JS.
This adds an IDL method and IPC to forward that JS from the Inspector
WebView to the Inspector client.
This commit is contained in:
Timothy Flynn 2023-11-30 19:27:32 -05:00 committed by Andreas Kling
commit 9f374a5d2a
Notes: sideshowbarker 2024-07-17 00:57:24 +09:00
10 changed files with 26 additions and 0 deletions

View file

@ -47,4 +47,10 @@ void Inspector::inspect_dom_node(i32 node_id, Optional<i32> const& pseudo_elemen
}
}
void Inspector::execute_console_script(String const& script)
{
if (auto* page = global_object().browsing_context()->page())
page->client().inspector_did_execute_console_script(script);
}
}