LibJS+WebContent+js: Reimplement console.log() and friends to spec

This implements the Logger and Printer abstract operations defined in
the console spec, and stubs out the Formatter AO. These are then used
for the "output a categorized log message" functions.
This commit is contained in:
Sam Atkins 2021-12-10 12:26:25 +00:00 committed by Andreas Kling
commit 260836135a
Notes: sideshowbarker 2024-07-17 22:07:06 +09:00
5 changed files with 211 additions and 125 deletions

View file

@ -24,16 +24,12 @@ public:
void send_messages(i32 start_index);
private:
virtual JS::Value log() override;
virtual JS::Value info() override;
virtual JS::Value debug() override;
virtual JS::Value warn() override;
virtual JS::Value error() override;
virtual JS::Value clear() override;
virtual JS::Value trace() override;
virtual JS::Value count() override;
virtual JS::Value count_reset() override;
virtual JS::Value assert_() override;
virtual JS::ThrowCompletionOr<JS::Value> printer(JS::Console::LogLevel log_level, Vector<JS::Value>&) override;
ClientConnection& m_client;
WeakPtr<JS::Interpreter> m_interpreter;