1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibWeb: Implement Element.setAttributeNode{,NS}()

This commit is contained in:
Andreas Kling 2023-03-10 14:56:29 +01:00
parent 8c5c78f1f1
commit fb6d6a985f
7 changed files with 33 additions and 8 deletions

View file

@ -18,6 +18,11 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Attr>> Attr::create(Document& document, Dep
return MUST_OR_THROW_OOM(document.heap().allocate<Attr>(document.realm(), document, QualifiedName(move(local_name), {}, {}), move(value), owner_element));
}
WebIDL::ExceptionOr<JS::NonnullGCPtr<Attr>> Attr::create(Document& document, QualifiedName qualified_name, DeprecatedString value, Element const* owner_element)
{
return MUST_OR_THROW_OOM(document.heap().allocate<Attr>(document.realm(), document, move(qualified_name), move(value), owner_element));
}
JS::NonnullGCPtr<Attr> Attr::clone(Document& document)
{
return *heap().allocate<Attr>(realm(), document, m_qualified_name, m_value, nullptr).release_allocated_value_but_fixme_should_propagate_errors();