1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

LibWeb: Expose three more attribute methods on Element

Exposes removeAttribute, hasAttribute and hasAttributes.
This commit is contained in:
Luke 2020-12-29 20:37:40 +00:00 committed by Andreas Kling
parent b05f048c05
commit 18d99919be
2 changed files with 4 additions and 0 deletions

View file

@ -60,6 +60,7 @@ public:
const FlyString& namespace_uri() const { return namespace_(); }
bool has_attribute(const FlyString& name) const { return !attribute(name).is_null(); }
bool has_attributes() const { return !m_attributes.is_empty(); }
String attribute(const FlyString& name) const;
String get_attribute(const FlyString& name) const { return attribute(name); }
void set_attribute(const FlyString& name, const String& value);