mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
LibWebView+WebContent: Port JS console handling to String
This commit is contained in:
parent
bbcd8bd97c
commit
a8d3252f93
Notes:
github-actions[bot]
2025-02-28 12:09:54 +00:00
Author: https://github.com/trflynn89
Commit: a8d3252f93
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3686
14 changed files with 58 additions and 56 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibJS/Console.h>
|
||||
|
@ -25,7 +26,7 @@ class WebContentConsoleClient final : public JS::ConsoleClient {
|
|||
public:
|
||||
virtual ~WebContentConsoleClient() override;
|
||||
|
||||
void handle_input(ByteString const& js_source);
|
||||
void handle_input(StringView js_source);
|
||||
void send_messages(i32 start_index);
|
||||
void report_exception(JS::Error const&, bool) override;
|
||||
|
||||
|
@ -46,8 +47,8 @@ private:
|
|||
GC::Ptr<ConsoleGlobalEnvironmentExtensions> m_console_global_environment_extensions;
|
||||
|
||||
void clear_output();
|
||||
void print_html(ByteString const& line);
|
||||
void begin_group(ByteString const& label, bool start_expanded);
|
||||
void print_html(String const& line);
|
||||
void begin_group(String const& label, bool start_expanded);
|
||||
virtual void end_group() override;
|
||||
|
||||
struct ConsoleOutput {
|
||||
|
@ -59,7 +60,7 @@ private:
|
|||
EndGroup,
|
||||
};
|
||||
Type type;
|
||||
ByteString data;
|
||||
String data;
|
||||
};
|
||||
Vector<ConsoleOutput> m_message_log;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue