mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibWeb: Implement Element.getAttributeNode
This commit is contained in:
parent
469ef22a22
commit
8066a67da2
3 changed files with 12 additions and 0 deletions
|
@ -93,6 +93,13 @@ String Element::get_attribute(FlyString const& name) const
|
|||
return attribute->value();
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-getattributenode
|
||||
JS::GCPtr<Attr> Element::get_attribute_node(FlyString const& name) const
|
||||
{
|
||||
// The getAttributeNode(qualifiedName) method steps are to return the result of getting an attribute given qualifiedName and this.
|
||||
return m_attributes->get_attribute(name);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-setattribute
|
||||
WebIDL::ExceptionOr<void> Element::set_attribute(FlyString const& name, String const& value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue