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:
parent
8e0f3436a2
commit
e4d97add3d
6 changed files with 29 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue