LibWeb: Port HTMLCollection from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-08-12 21:30:18 +12:00 committed by Andreas Kling
parent ebdfe2e863
commit d5409a056a
Notes: sideshowbarker 2024-07-17 06:40:21 +09:00
4 changed files with 7 additions and 5 deletions

View file

@ -65,7 +65,7 @@ DOM::Element* HTMLSelectElement::item(size_t index)
DOM::Element* HTMLSelectElement::named_item(DeprecatedFlyString const& name)
{
// The namedItem(name) method must return the value returned by the method of the same name on the options collection, when invoked with the same argument.
return const_cast<HTMLOptionsCollection&>(*options()).named_item(name);
return const_cast<HTMLOptionsCollection&>(*options()).named_item(FlyString::from_deprecated_fly_string(name).release_value());
}
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-select-add