mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 23:31:55 +00:00
LibWebView+WebContent: Begin supporting the DevTools JavaScript console
This supports evaluating the script and replying with the result. We currently serialize JS objects to a string, but we will need to support dynamic interaction with the objects over IPC. This does not yet support sending console messages to DevTools.
This commit is contained in:
parent
6d33b70e61
commit
32bc2dc7b6
Notes:
github-actions[bot]
2025-02-28 12:09:35 +00:00
Author: https://github.com/trflynn89
Commit: 32bc2dc7b6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3686
10 changed files with 101 additions and 2 deletions
|
@ -366,6 +366,14 @@ void WebContentClient::did_get_internal_page_info(u64 page_id, WebView::PageInfo
|
|||
view->did_receive_internal_page_info({}, type, info);
|
||||
}
|
||||
|
||||
void WebContentClient::did_execute_js_console_input(u64 page_id, JsonValue const& result)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_received_js_console_result)
|
||||
view->on_received_js_console_result(move(const_cast<JsonValue&>(result)));
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_output_js_console_message(u64 page_id, i32 message_index)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue