1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 10:15:07 +00:00
serenity/LibHTML/DOM/ParentNode.cpp

11 lines
307 B
C++

#include <LibHTML/DOM/ParentNode.h>
void ParentNode::append_child(NonnullRefPtr<Node> node)
{
if (m_last_child)
m_last_child->set_next_sibling(node.ptr());
node->set_parent_node({}, this);
m_last_child = &node.leak_ref();
if (!m_first_child)
m_first_child = m_last_child;
}