1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibWeb: Make Element::remove_attribute take a StringView

It already delegates to a function which accepts a StringView, so there
is no advantage here in taking a FlyString. Ideally, both of these
functions should be taking a 'FlyString const&', so leave a FIXME for
that. In the meantime, this should help in porting away from
DeprecatedString.
This commit is contained in:
Shannon Booth 2023-09-21 20:09:51 +12:00 committed by Andreas Kling
parent fc7f79e0e7
commit ab674f3bf6
3 changed files with 6 additions and 2 deletions

View file

@ -295,7 +295,7 @@ WebIDL::ExceptionOr<JS::GCPtr<Attr>> Element::set_attribute_node_ns(Attr& attr)
}
// https://dom.spec.whatwg.org/#dom-element-removeattribute
void Element::remove_attribute(DeprecatedFlyString const& name)
void Element::remove_attribute(StringView name)
{
// The removeAttribute(qualifiedName) method steps are to remove an attribute given qualifiedName and this, and then return undefined.
m_attributes->remove_attribute(name);