mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWebView: Rename a couple of console-related callbacks for clarity
The "on_received_console_message" and "on_received_console_messages" were indistinguishable in purpose based on their name. This renames them to: on_console_message_available - WebContent has output a console message and it is available for the client to retrieve. on_received_styled_console_messages - WebContent has replied to a request for the available console messages. The "styled" qualifier is used here to indicate that the messages have been styled with CSS for display in a WebView. This is to prepare for an upcoming patch where DevToolsConsoleClient will not stylize the output; DevTools will want the raw JS values.
This commit is contained in:
parent
14a8ffa867
commit
848ac11495
Notes:
github-actions[bot]
2025-03-04 20:34:57 +00:00
Author: https://github.com/trflynn89
Commit: 848ac11495
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3801
Reviewed-by: https://github.com/AtkinsSJ
9 changed files with 23 additions and 23 deletions
|
@ -372,16 +372,16 @@ void WebContentClient::did_execute_js_console_input(u64 page_id, JsonValue const
|
|||
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()) {
|
||||
if (view->on_received_console_message)
|
||||
view->on_received_console_message(message_index);
|
||||
if (view->on_console_message_available)
|
||||
view->on_console_message_available(message_index);
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_get_js_console_messages(u64 page_id, i32 start_index, Vector<String> const& message_types, Vector<String> const& messages)
|
||||
void WebContentClient::did_get_styled_js_console_messages(u64 page_id, i32 start_index, Vector<String> const& message_types, Vector<String> const& messages)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_received_console_messages)
|
||||
view->on_received_console_messages(start_index, message_types, messages);
|
||||
if (view->on_received_styled_console_messages)
|
||||
view->on_received_styled_console_messages(start_index, message_types, messages);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue