mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +00:00
LibWeb: Grey out invisible nodes in the DOM inspector
This makes it easier to navigate large DOM trees where some nodes have display: none
This commit is contained in:
parent
a128d4931d
commit
69fc7009bf
2 changed files with 4 additions and 0 deletions
|
@ -793,6 +793,8 @@ void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) c
|
|||
MUST(object.add("data"sv, static_cast<DOM::Comment const&>(*this).data()));
|
||||
}
|
||||
|
||||
MUST((object.add("visible"sv, !!layout_node())));
|
||||
|
||||
if (has_child_nodes()) {
|
||||
auto children = MUST(object.add_array("children"));
|
||||
for_each_child([&children](DOM::Node& child) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue