mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
LibWeb+WebContent: Add IPC flow for Inspect DOM Tree
Add `inspect_dom_tree` to WebContentServer and 'did_get_dom_tree' to WebContentClient. These two async methods form a request & response for requesting a JSON representation of the Content's DOM tree.
This commit is contained in:
parent
4affe052b8
commit
cd6b9613c5
Notes:
sideshowbarker
2024-07-18 11:15:35 +09:00
Author: https://github.com/ant1441
Commit: cd6b9613c5
Pull-request: https://github.com/SerenityOS/serenity/pull/7900
Issue: https://github.com/SerenityOS/serenity/issues/5267
Reviewed-by: https://github.com/MaxWipfli
9 changed files with 31 additions and 0 deletions
|
@ -335,6 +335,12 @@ void OutOfProcessWebView::notify_server_did_get_source(const URL& url, const Str
|
|||
on_get_source(url, source);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_get_dom_tree(const String& dom_tree)
|
||||
{
|
||||
if (on_get_dom_tree)
|
||||
on_get_dom_tree(dom_tree);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_js_console_output(const String& method, const String& line)
|
||||
{
|
||||
if (on_js_console_output)
|
||||
|
@ -391,6 +397,11 @@ void OutOfProcessWebView::get_source()
|
|||
client().async_get_source();
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::inspect_dom_tree()
|
||||
{
|
||||
client().async_inspect_dom_tree();
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::js_console_initialize()
|
||||
{
|
||||
client().async_js_console_initialize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue