mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibWeb: Add JSON serialization method to DOM::Node
This method builds a JSON object representing the full state of the DOM tree. The JSON that is built will be used for building the DOM Inspector widget for the OutOfProcessWebView.
This commit is contained in:
parent
f4eab69785
commit
4affe052b8
4 changed files with 48 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/JsonObjectSerializer.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/TypeCasts.h>
|
||||
|
@ -162,6 +163,9 @@ public:
|
|||
|
||||
bool is_host_including_inclusive_ancestor_of(const Node&) const;
|
||||
|
||||
// Used for dumping the DOM Tree
|
||||
void serialize_tree_as_json(JsonObjectSerializer<StringBuilder>&) const;
|
||||
|
||||
protected:
|
||||
Node(Document&, NodeType);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue