mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibWeb: Add NamedNodeMap::getNamedItemNS()
This patch allows us to use method getNamedItemNS() of NamedNodeMap API.
This commit is contained in:
parent
ce6cf5bab8
commit
f2d7690702
3 changed files with 8 additions and 1 deletions
|
@ -80,6 +80,12 @@ Attr const* NamedNodeMap::get_named_item(StringView qualified_name) const
|
||||||
return get_attribute(qualified_name);
|
return get_attribute(qualified_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#dom-namednodemap-getnameditemns
|
||||||
|
Attr const* NamedNodeMap::get_named_item_ns(StringView namespace_, StringView local_name) const
|
||||||
|
{
|
||||||
|
return get_attribute_ns(namespace_, local_name);
|
||||||
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-namednodemap-setnameditem
|
// https://dom.spec.whatwg.org/#dom-namednodemap-setnameditem
|
||||||
WebIDL::ExceptionOr<Attr const*> NamedNodeMap::set_named_item(Attr& attribute)
|
WebIDL::ExceptionOr<Attr const*> NamedNodeMap::set_named_item(Attr& attribute)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,7 @@ public:
|
||||||
// Methods defined by the spec for JavaScript:
|
// Methods defined by the spec for JavaScript:
|
||||||
Attr const* item(u32 index) const;
|
Attr const* item(u32 index) const;
|
||||||
Attr const* get_named_item(StringView qualified_name) const;
|
Attr const* get_named_item(StringView qualified_name) const;
|
||||||
|
Attr const* get_named_item_ns(StringView namespace_, StringView local_name) const;
|
||||||
WebIDL::ExceptionOr<Attr const*> set_named_item(Attr& attribute);
|
WebIDL::ExceptionOr<Attr const*> set_named_item(Attr& attribute);
|
||||||
WebIDL::ExceptionOr<Attr const*> remove_named_item(StringView qualified_name);
|
WebIDL::ExceptionOr<Attr const*> remove_named_item(StringView qualified_name);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ interface NamedNodeMap {
|
||||||
|
|
||||||
getter Attr? item(unsigned long index);
|
getter Attr? item(unsigned long index);
|
||||||
getter Attr? getNamedItem(DOMString qualifiedName);
|
getter Attr? getNamedItem(DOMString qualifiedName);
|
||||||
// Attr? getNamedItemNS(DOMString? namespace, DOMString localName);
|
Attr? getNamedItemNS(DOMString? namespace, DOMString localName);
|
||||||
|
|
||||||
[CEReactions] Attr? setNamedItem(Attr attr);
|
[CEReactions] Attr? setNamedItem(Attr attr);
|
||||||
// [CEReactions] Attr? setNamedItemNS(Attr attr);
|
// [CEReactions] Attr? setNamedItemNS(Attr attr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue