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

LibWeb: Implement Node.cloneNode for Attr nodes

This commit is contained in:
Andreas Kling 2022-12-13 13:08:46 +01:00
parent 9a9c8460aa
commit a004d3043f
3 changed files with 12 additions and 6 deletions

View file

@ -750,10 +750,10 @@ JS::NonnullGCPtr<Node> Node::clone_node(Document* document, bool clone_children)
document_type_copy->set_system_id(document_type->system_id());
copy = move(document_type_copy);
} else if (is<Attr>(this)) {
// FIXME:
// Attr
// Set copys namespace, namespace prefix, local name, and value to those of node.
dbgln("clone_node() not implemented for Attribute");
auto& attr = static_cast<Attr&>(*this);
copy = attr.clone(*document);
} else if (is<Text>(this)) {
// Text
auto text = verify_cast<Text>(this);