mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 15:32:51 +00:00
AK: Port URL scheme from DeprecatedString to String
This commit is contained in:
parent
21fe86d235
commit
c25485700a
Notes:
sideshowbarker
2024-07-17 01:51:00 +09:00
Author: https://github.com/shannonbooth
Commit: c25485700a
Pull-request: https://github.com/SerenityOS/serenity/pull/20510
Reviewed-by: https://github.com/ADKaster ✅
16 changed files with 30 additions and 30 deletions
|
@ -69,10 +69,10 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebSocket>> WebSocket::construct_impl(JS::R
|
|||
|
||||
// 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws".
|
||||
if (url_record.scheme() == "http"sv)
|
||||
url_record.set_scheme("ws"sv);
|
||||
url_record.set_scheme("ws"_string);
|
||||
// 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss".
|
||||
else if (url_record.scheme() == "https"sv)
|
||||
url_record.set_scheme("wss"sv);
|
||||
url_record.set_scheme("wss"_string);
|
||||
|
||||
// 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException.
|
||||
if (!url_record.scheme().is_one_of("ws"sv, "wss"sv))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue