LibWeb: Add Element::for_each_attribute(Function<void(Attr const&)>)

This is useful when you are wanting to interate over attributes and need
more information than just the name and value.
This commit is contained in:
Shannon Booth 2023-11-10 10:04:18 +13:00 committed by Andreas Kling
commit 45b63b463a
Notes: sideshowbarker 2024-07-17 00:25:35 +09:00
2 changed files with 11 additions and 4 deletions

View file

@ -137,6 +137,8 @@ public:
int client_width() const;
int client_height() const;
void for_each_attribute(Function<void(Attr const&)>) const;
void for_each_attribute(Function<void(FlyString const&, DeprecatedString const&)>) const;
bool has_class(FlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const;