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

LibWeb: Make factory method of DOM::ElementFactory fallible

This commit is contained in:
Kenneth Myhra 2023-02-19 16:22:24 +01:00 committed by Andreas Kling
parent a2381a672d
commit ff92324fa5
15 changed files with 115 additions and 111 deletions

View file

@ -727,7 +727,7 @@ JS::NonnullGCPtr<Node> Node::clone_node(Document* document, bool clone_children)
if (is<Element>(this)) {
// 1. Let copy be the result of creating an element, given document, nodes local name, nodes namespace, nodes namespace prefix, and nodes is value, with the synchronous custom elements flag unset.
auto& element = *verify_cast<Element>(this);
auto element_copy = DOM::create_element(*document, element.local_name(), element.namespace_() /* FIXME: nodes namespace prefix, and nodes is value, with the synchronous custom elements flag unset */);
auto element_copy = DOM::create_element(*document, element.local_name(), element.namespace_() /* FIXME: nodes namespace prefix, and nodes is value, with the synchronous custom elements flag unset */).release_value_but_fixme_should_propagate_errors();
// 2. For each attribute in nodes attribute list:
element.for_each_attribute([&](auto& name, auto& value) {