mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +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:
parent
52fccae654
commit
79f97da4b4
5 changed files with 8 additions and 5 deletions
|
@ -91,7 +91,8 @@ public:
|
|||
// NOTE: This is for the JS bindings
|
||||
DeprecatedFlyString namespace_uri() const { return namespace_(); }
|
||||
|
||||
bool has_attribute(DeprecatedFlyString const& name) const;
|
||||
// FIXME: This should be taking a 'FlyString const&'
|
||||
bool has_attribute(StringView name) const;
|
||||
bool has_attribute_ns(DeprecatedFlyString namespace_, DeprecatedFlyString const& name) const;
|
||||
bool has_attributes() const;
|
||||
|
||||
|
@ -104,6 +105,7 @@ public:
|
|||
return String::from_deprecated_string(ret).release_value();
|
||||
}
|
||||
|
||||
// FIXME: This should be taking a 'FlyString const&' / 'Optional<FlyString> const&'
|
||||
DeprecatedString get_attribute(DeprecatedFlyString const& name) const;
|
||||
DeprecatedString get_attribute_value(DeprecatedFlyString const& local_name, DeprecatedFlyString const& namespace_ = {}) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue