1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

LibWeb: Make Element::has_attribute take a StringView

It calls Element::get_attribute which takes a StringView. Ultimately,
this should be taking a FlyString, but to help in porting away from
DeprecatedString, just leave a FIXME for that for now.
This commit is contained in:
Shannon Booth 2023-09-21 20:26:19 +12:00 committed by Andreas Kling
parent 52fccae654
commit 79f97da4b4
5 changed files with 8 additions and 5 deletions

View file

@ -43,6 +43,7 @@ public:
WebIDL::ExceptionOr<Attr const*> remove_named_item_ns(Optional<String> const& namespace_, StringView local_name);
// Methods defined by the spec for internal use:
// FIXME: These should be taking `FlyString const&' / 'Optional<FlyString> const&'
Attr* get_attribute(StringView qualified_name, size_t* item_index = nullptr);
Attr* get_attribute_ns(StringView namespace_, StringView local_name, size_t* item_index = nullptr);
Attr const* get_attribute(StringView qualified_name, size_t* item_index = nullptr) const;