1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

Browser: Add output styles to values printed in the console

This patch adds spans around most of the console's output, allowing
for a global document stylesheet to customize the highlighting of
the console's output. It also adds some basic styling for values
like strings, numbers, and arrays using the system Palette.

Note: This patch simply adds support for highlighting output values,
the lines of JS code printed to console are still unformatted.
This commit is contained in:
FalseHonesty 2020-05-24 21:35:46 -04:00 committed by Andreas Kling
parent 4ad891a078
commit 2c2ce5be64
2 changed files with 113 additions and 11 deletions

View file

@ -45,6 +45,8 @@ public:
private:
ConsoleWidget();
String create_document_style();
void print_value(JS::Value, StringBuilder& output_html, HashTable<JS::Object*> seen_objects = {});
void print_array(const JS::Array&, StringBuilder& output_html, HashTable<JS::Object*>&);
void print_object(const JS::Object&, StringBuilder& output_html, HashTable<JS::Object*>&);