mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibJS: Integrate Symbols into objects as valid keys
This allows objects properties to be created for symbol keys in addition to just plain strings/numbers
This commit is contained in:
parent
9783a4936c
commit
7a1d485b19
14 changed files with 424 additions and 154 deletions
|
@ -146,7 +146,7 @@ void MarkupGenerator::object_to_html(const Object& object, StringBuilder& html_o
|
|||
|
||||
size_t index = 0;
|
||||
for (auto& it : object.shape().property_table_ordered()) {
|
||||
html_output.append(wrap_string_in_style(String::format("\"%s\"", it.key.characters()), StyleType::String));
|
||||
html_output.append(wrap_string_in_style(String::format("\"%s\"", it.key.to_display_string().characters()), StyleType::String));
|
||||
html_output.append(wrap_string_in_style(": ", StyleType::Punctuation));
|
||||
value_to_html(object.get_direct(it.value.offset), html_output, seen_objects);
|
||||
if (index != object.shape().property_count() - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue