mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
LibWeb: Show DOM comment contents in DOM inspector
This commit is contained in:
parent
5db51d85a3
commit
5088846606
2 changed files with 5 additions and 0 deletions
|
@ -714,6 +714,9 @@ void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) c
|
|||
|
||||
auto text_node = static_cast<DOM::Text const*>(this);
|
||||
object.add("text", text_node->data());
|
||||
} else if (is_comment()) {
|
||||
object.add("type"sv, "comment"sv);
|
||||
object.add("data"sv, static_cast<DOM::Comment const&>(*this).data());
|
||||
}
|
||||
|
||||
if (has_child_nodes()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue