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

LibWeb: Port named_item_value from DeprecatedFlyString

This commit is contained in:
Shannon Booth 2023-10-08 13:16:50 +13:00 committed by Tim Flynn
parent c7cd6f2bef
commit b37aab1277
19 changed files with 33 additions and 36 deletions

View file

@ -147,9 +147,9 @@ WebIDL::ExceptionOr<JS::Value> HTMLCollection::item_value(size_t index) const
return const_cast<Element*>(element);
}
WebIDL::ExceptionOr<JS::Value> HTMLCollection::named_item_value(DeprecatedFlyString const& index) const
WebIDL::ExceptionOr<JS::Value> HTMLCollection::named_item_value(FlyString const& index) const
{
auto* element = named_item(FlyString::from_deprecated_fly_string(index).release_value());
auto* element = named_item(index);
if (!element)
return JS::js_undefined();
return const_cast<Element*>(element);