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

LibWeb: Implement the Element attributes getter

This commit is contained in:
Timothy Flynn 2021-10-16 17:00:49 -04:00 committed by Linus Groh
parent c62b70d88f
commit 5d4cd061c7
2 changed files with 2 additions and 0 deletions

View file

@ -56,6 +56,7 @@ public:
ExceptionOr<void> set_attribute(const FlyString& name, const String& value);
void remove_attribute(const FlyString& name);
size_t attribute_list_size() const { return m_attributes->length(); }
NonnullRefPtr<NamedNodeMap> const& attributes() const { return m_attributes; }
DOM::ExceptionOr<bool> matches(StringView selectors) const;

View file

@ -9,6 +9,7 @@ interface Element : Node {
undefined removeAttribute(DOMString qualifiedName);
boolean hasAttribute(DOMString qualifiedName);
boolean hasAttributes();
[SameObject] readonly attribute NamedNodeMap attributes;
HTMLCollection getElementsByTagName(DOMString tagName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);