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

LibWeb: Implement Element.getAttributeNodeNS

This commit is contained in:
Shannon Booth 2024-01-14 18:04:18 +13:00 committed by Andrew Kaster
parent a7316d3641
commit 7a26a889cb
5 changed files with 37 additions and 1 deletions

View file

@ -164,6 +164,13 @@ JS::GCPtr<Attr> Element::get_attribute_node(FlyString const& name) const
return m_attributes->get_attribute(name);
}
// https://dom.spec.whatwg.org/#dom-element-getattributenodens
JS::GCPtr<Attr> Element::get_attribute_node_ns(Optional<FlyString> const& namespace_, FlyString const& name) const
{
// The getAttributeNodeNS(namespace, localName) method steps are to return the result of getting an attribute given namespace, localName, and this.
return m_attributes->get_attribute_ns(namespace_, name);
}
// https://dom.spec.whatwg.org/#dom-element-setattribute
WebIDL::ExceptionOr<void> Element::set_attribute(FlyString const& name, String const& value)
{