1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:48:13 +00:00

LibWeb: Make clone_node capable of cloning document fragments

Used by Web Components Polyfills.
This commit is contained in:
Luke 2021-07-05 05:21:52 +01:00 committed by Andreas Kling
parent f7ad8c0f94
commit 5430bc8963

View file

@ -446,6 +446,9 @@ NonnullRefPtr<Node> Node::clone_node(Document* document, bool clone_children) co
auto processing_instruction = verify_cast<ProcessingInstruction>(this);
auto processing_instruction_copy = adopt_ref(*new ProcessingInstruction(*document, processing_instruction->data(), processing_instruction->target()));
copy = move(processing_instruction_copy);
} else if (is<DocumentFragment>(this)) {
auto document_fragment_copy = adopt_ref(*new DocumentFragment(*document));
copy = move(document_fragment_copy);
} else {
dbgln("clone_node() not implemented for NodeType {}", (u16)m_type);
TODO();