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

AK: Port URL scheme from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-08-12 16:52:41 +12:00 committed by Andrew Kaster
parent 21fe86d235
commit c25485700a
16 changed files with 30 additions and 30 deletions

View file

@ -69,10 +69,10 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebSocket>> WebSocket::construct_impl(JS::R
// 4. If urlRecords scheme is "http", then set urlRecords scheme to "ws".
if (url_record.scheme() == "http"sv)
url_record.set_scheme("ws"sv);
url_record.set_scheme("ws"_string);
// 5. Otherwise, if urlRecords scheme is "https", set urlRecords scheme to "wss".
else if (url_record.scheme() == "https"sv)
url_record.set_scheme("wss"sv);
url_record.set_scheme("wss"_string);
// 6. If urlRecords scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException.
if (!url_record.scheme().is_one_of("ws"sv, "wss"sv))