mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07: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
|
@ -129,6 +129,8 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
|||
if (role == GUI::ModelRole::Display) {
|
||||
if (type == "text")
|
||||
return with_whitespace_collapsed(node.get("text").as_string());
|
||||
if (type == "comment"sv)
|
||||
return String::formatted("<!--{}-->", node.get("data"sv).as_string());
|
||||
if (type != "element")
|
||||
return node_name;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue