diff --git a/Userland/Libraries/LibJS/MarkupGenerator.cpp b/Userland/Libraries/LibJS/MarkupGenerator.cpp index fb8e8fb6e5..591c421b9d 100644 --- a/Userland/Libraries/LibJS/MarkupGenerator.cpp +++ b/Userland/Libraries/LibJS/MarkupGenerator.cpp @@ -83,6 +83,7 @@ void MarkupGenerator::value_to_html(Value value, StringBuilder& output_html, Has if (value.is_object()) { auto& object = value.as_object(); + output_html.append(wrap_string_in_style(object.class_name(), StyleType::ObjectType)); if (object.is_function()) return function_to_html(object, output_html, seen_objects); if (is(object)) @@ -198,6 +199,8 @@ String MarkupGenerator::style_from_style_type(StyleType type) return "color: -libweb-palette-syntax-control-keyword;"; case StyleType::Identifier: return "color: -libweb-palette-syntax-identifier;"; + case StyleType::ObjectType: + return "padding: 2px; background-color: #ddf; color: black; font-weight: bold;"; default: VERIFY_NOT_REACHED(); } diff --git a/Userland/Libraries/LibJS/MarkupGenerator.h b/Userland/Libraries/LibJS/MarkupGenerator.h index 467f9f2ac9..d6c5e60466 100644 --- a/Userland/Libraries/LibJS/MarkupGenerator.h +++ b/Userland/Libraries/LibJS/MarkupGenerator.h @@ -48,7 +48,8 @@ private: Operator, Keyword, ControlKeyword, - Identifier + Identifier, + ObjectType, }; static void value_to_html(Value, StringBuilder& output_html, HashTable seen_objects = {});