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

LibWeb: Implement Element.toggleAttribute()

This commit is contained in:
Elisée Maurer 2022-03-30 16:50:44 +02:00 committed by Andreas Kling
parent 1ec3847acd
commit 34db0dab41
3 changed files with 50 additions and 0 deletions

View file

@ -57,6 +57,7 @@ public:
ExceptionOr<void> set_attribute(const FlyString& name, const String& value);
ExceptionOr<void> set_attribute_ns(FlyString const& namespace_, FlyString const& qualified_name, String const& value);
void remove_attribute(const FlyString& name);
DOM::ExceptionOr<bool> toggle_attribute(FlyString const& name, Optional<bool> force);
size_t attribute_list_size() const { return m_attributes->length(); }
NonnullRefPtr<NamedNodeMap> const& attributes() const { return m_attributes; }
Vector<String> get_attribute_names() const;