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
commit b37aab1277
Notes: sideshowbarker 2024-07-16 22:26:05 +09:00
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);