LibWeb: Implement Element.removeAttributeNode()

This commit is contained in:
Andreas Kling 2024-04-14 15:49:48 +02:00
commit 20bdda7f02
Notes: sideshowbarker 2024-07-16 22:17:03 +09:00
7 changed files with 43 additions and 1 deletions

View file

@ -305,6 +305,12 @@ void Element::remove_attribute_ns(Optional<FlyString> const& namespace_, FlyStri
m_attributes->remove_attribute_ns(namespace_, name);
}
// https://dom.spec.whatwg.org/#dom-element-removeattributenode
WebIDL::ExceptionOr<JS::NonnullGCPtr<Attr>> Element::remove_attribute_node(JS::NonnullGCPtr<Attr> attr)
{
return m_attributes->remove_attribute_node(attr);
}
// https://dom.spec.whatwg.org/#dom-element-hasattribute
bool Element::has_attribute(FlyString const& name) const
{