1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

LibWeb: Implement ParentNode.children

Required by Web Platform Tests for the innerHTML/outerHTML tests.
This commit is contained in:
Luke Wilde 2021-09-13 23:01:17 +01:00 committed by Andreas Kling
parent 8e0f3436a2
commit e4d97add3d
6 changed files with 29 additions and 0 deletions

View file

@ -398,6 +398,15 @@ public:
return nullptr;
}
bool is_parent_of(T const& other) const
{
for (auto* child = first_child(); child; child = child->next_sibling()) {
if (&other == child)
return true;
}
return false;
}
~TreeNode()
{
VERIFY(!m_parent);