mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Add TreeNode::remove()
This allows for easy child removal similar to `DOM::Node::remove()`.
This commit is contained in:
parent
b4ebade9c2
commit
c0e861e2fa
|
|
@ -50,6 +50,11 @@ public:
|
|||
void remove_child(GC::Ref<T> node);
|
||||
|
||||
void replace_child(GC::Ref<T> new_child, GC::Ref<T> old_child);
|
||||
void remove()
|
||||
{
|
||||
VERIFY(m_parent);
|
||||
m_parent->remove_child(*static_cast<T*>(this));
|
||||
}
|
||||
|
||||
T* next_in_pre_order()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user