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

LibWeb: Handle currently ignored WebIDL::ExceptionOr<T>s

This commit is contained in:
Linus Groh 2022-10-30 17:50:04 +00:00
parent f01d90aa63
commit acfb546048
38 changed files with 153 additions and 149 deletions

View file

@ -70,13 +70,13 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name,
}
if (HTML::TagNames::template_ == m_current_node->node_name()) {
// When an XML parser would append a node to a template element, it must instead append it to the template element's template contents (a DocumentFragment node).
static_cast<HTML::HTMLTemplateElement&>(*m_current_node).content()->append_child(node);
MUST(static_cast<HTML::HTMLTemplateElement&>(*m_current_node).content()->append_child(node));
} else {
m_current_node->append_child(node);
MUST(m_current_node->append_child(node));
}
for (auto& attribute : attributes)
node->set_attribute(attribute.key, attribute.value);
MUST(node->set_attribute(attribute.key, attribute.value));
m_current_node = node.ptr();
}
@ -131,7 +131,7 @@ void XMLDocumentBuilder::text(String const& data)
text_builder.clear();
} else {
auto node = m_document.create_text_node(data);
m_current_node->append_child(node);
MUST(m_current_node->append_child(node));
}
}
@ -139,7 +139,7 @@ void XMLDocumentBuilder::comment(String const& data)
{
if (m_has_error)
return;
m_document.append_child(m_document.create_comment(data));
MUST(m_document.append_child(m_document.create_comment(data)));
}
void XMLDocumentBuilder::document_end()