mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Add a couple child node operations to Node and add node types
This commit is contained in:
@@ -266,4 +266,15 @@ ParentNode* Node::parent_or_shadow_host()
|
||||
return downcast<ParentNode>(parent());
|
||||
}
|
||||
|
||||
NonnullRefPtrVector<Node> Node::child_nodes() const
|
||||
{
|
||||
NonnullRefPtrVector<Node> nodes;
|
||||
|
||||
for_each_child([&](auto& child) {
|
||||
nodes.append(child);
|
||||
});
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user