LibIDL+LibWeb: Support UTF-16 USVString

This commit is contained in:
Timothy Flynn 2025-07-25 15:56:36 -04:00 committed by Jelle Raaijmakers
commit 49467d0583
Notes: github-actions[bot] 2025-07-25 22:41:48 +00:00
4 changed files with 9 additions and 3 deletions

View file

@ -244,6 +244,11 @@ JS::ThrowCompletionOr<String> to_usv_string(JS::VM& vm, JS::Value value)
return TRY(value.to_utf16_string(vm)).to_well_formed_utf8();
}
JS::ThrowCompletionOr<Utf16String> to_utf16_usv_string(JS::VM& vm, JS::Value value)
{
return TRY(value.to_utf16_string(vm)).to_well_formed();
}
// https://webidl.spec.whatwg.org/#invoke-a-callback-function
// https://whatpr.org/webidl/1437.html#invoke-a-callback-function
template<typename ReturnSteps>