1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00
serenity/Userland/Libraries/LibJS
Sam Atkins 7a2da4cabf Browser+WebContent+LibJS: Support %c specifiers in Console.log()
...and the other Console methods.

This lets you apply styling to a log message or any other text that
passes through the Console `Formatter` operation.

We store the CSS on the ConsoleClient instead of passing it along with
the rest of the message, since I couldn't figure out a nice way of
doing that, as Formatter has to return JS::Values. This way isn't nice,
and has a risk of forgetting to clear the style and having it apply to
subsequent messages, but it works.

This is only supported in the Browser for now. REPL support would
require parsing the CSS and figuring out the relevant ANSI codes. We
also don't filter this styling at all, so you can `position: absolute`
and `transform: translate(...)` all you want, which is less than
ideal.
2022-09-21 20:03:49 +01:00
..
Bytecode LibJS: Implement SuperCall for the Bytecode-VM 2022-08-31 15:22:36 +01:00
Contrib/Test262 LibJS: Implement $262.evalScript() according to the given algorithm 2022-08-30 12:00:04 +01:00
Heap AK+LibJS: Handle NaN-boxing pointers on AArch64 2022-09-21 11:55:57 +02:00
Runtime LibJS: Implement normative change in String.prototype.substr 2022-09-21 16:59:58 +01:00
Tests LibJS: Implement normative change in String.prototype.substr 2022-09-21 16:59:58 +01:00
AST.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
AST.h LibJS: Handle empty named export 2022-09-02 02:07:37 +01:00
CMakeLists.txt LibC: Remove the LibM interface target 2022-09-16 16:09:19 +00:00
Console.cpp Browser+WebContent+LibJS: Support %c specifiers in Console.log() 2022-09-21 20:03:49 +01:00
Console.h Browser+WebContent+LibJS: Support %c specifiers in Console.log() 2022-09-21 20:03:49 +01:00
CyclicModule.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
CyclicModule.h LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Forward.h LibJS: Move ConsoleObject construction from GlobalObject to Intrinsics 2022-08-28 16:36:56 +01:00
Interpreter.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Interpreter.h LibJS: Remove {Bytecode::,}Interpreter::global_object() 2022-08-23 13:58:30 +01:00
Lexer.cpp Everywhere: Use default StringView constructor over nullptr 2022-07-12 23:11:35 +02:00
Lexer.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
MarkupGenerator.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
MarkupGenerator.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Module.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Module.h LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Parser.cpp LibJS: Allow anonymous functions as default exports 2022-09-02 02:07:37 +01:00
Parser.h LibJS: Allow anonymous functions as default exports 2022-09-02 02:07:37 +01:00
Script.cpp LibJS: Make sure JS::Script visits its HostDefined object 2022-09-06 01:21:09 +02:00
Script.h LibJS+LibWeb: Make HTML::Script GC-allocated 2022-09-06 00:27:09 +02:00
SourceRange.h LibJS: Add missing headers 2021-10-06 23:52:40 +01:00
SourceTextModule.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
SourceTextModule.h LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
SyntaxHighlighter.cpp LibJS: Remove a bunch of gratuitous JS namespace qualifiers 2022-04-03 15:19:33 +01:00
SyntaxHighlighter.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SyntheticModule.cpp LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
SyntheticModule.h LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Token.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Token.h Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00