LibWeb: Make Element::has_attribute_ns take a StringView
Similar to Element::has_attribute, ideally this would take a `FlyString const&`, but NamedNodeMap::get_attribute_ns already takes a StringView. To aid in porting away from DeprecatedString, just take a StringView for now.
This commit is contained in:
parent
eaa6304aab
commit
e5e4920e66
Notes:
sideshowbarker
2024-07-17 08:38:37 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/e5e4920e66 Pull-request: https://github.com/SerenityOS/serenity/pull/21283
2 changed files with 2 additions and 2 deletions
|
@ -310,7 +310,7 @@ bool Element::has_attribute(StringView name) const
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-hasattributens
|
||||
bool Element::has_attribute_ns(DeprecatedFlyString namespace_, DeprecatedFlyString const& name) const
|
||||
bool Element::has_attribute_ns(StringView namespace_, StringView name) const
|
||||
{
|
||||
// 1. If namespace is the empty string, then set it to null.
|
||||
if (namespace_.is_empty())
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
// 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_attribute_ns(StringView namespace_, StringView name) const;
|
||||
bool has_attributes() const;
|
||||
|
||||
// FIXME: This should be taking a 'FlyString const&'
|
||||
|
|
Loading…
Add table
Reference in a new issue