mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Include DOM Node ID in serialized JSON
This will be used in the DOM Inspector to communicate which node is being inspected.
This commit is contained in:
parent
2d6a02f03b
commit
1159eefff3
Notes:
sideshowbarker
2024-07-18 04:52:16 +09:00
Author: https://github.com/AtkinsSJ
Commit: 1159eefff3
Pull-request: https://github.com/SerenityOS/serenity/pull/9725
Issue: https://github.com/SerenityOS/serenity/issues/8935
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 0 deletions
|
@ -640,6 +640,7 @@ RefPtr<Document> Node::owner_document() const
|
|||
void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) const
|
||||
{
|
||||
object.add("name", node_name().view());
|
||||
object.add("id", id());
|
||||
if (is_document()) {
|
||||
object.add("type", "document");
|
||||
} else if (is_element()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue