diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2023-03-05 10:33:56 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-05 18:25:59 +0000 |
commit | eed69e5093011aad0663a705c982302180dd0c64 (patch) | |
tree | 1a652165d5041487d86e070abfed624e9d9179a9 /Userland/Libraries/LibWeb/WebSockets | |
parent | 84997ab0eecc9ee9926b0b05007f525bfd9cba6f (diff) | |
download | serenity-eed69e5093011aad0663a705c982302180dd0c64.zip |
LibWeb: Port MessageEvent to new String
Diffstat (limited to 'Userland/Libraries/LibWeb/WebSockets')
-rw-r--r-- | Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp index 07b7d6c78e..275116fae6 100644 --- a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp +++ b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp @@ -234,8 +234,8 @@ void WebSocket::on_message(ByteBuffer message, bool is_text) auto text_message = DeprecatedString(ReadonlyBytes(message)); HTML::MessageEventInit event_init; event_init.data = JS::PrimitiveString::create(vm(), text_message); - event_init.origin = url(); - dispatch_event(HTML::MessageEvent::create(realm(), HTML::EventNames::message, event_init).release_value_but_fixme_should_propagate_errors()); + event_init.origin = String::from_deprecated_string(url()).release_value_but_fixme_should_propagate_errors(); + dispatch_event(HTML::MessageEvent::create(realm(), String::from_deprecated_string(HTML::EventNames::message).release_value_but_fixme_should_propagate_errors(), event_init).release_value_but_fixme_should_propagate_errors()); return; } @@ -246,8 +246,8 @@ void WebSocket::on_message(ByteBuffer message, bool is_text) // type indicates that the data is Binary and binaryType is "arraybuffer" HTML::MessageEventInit event_init; event_init.data = JS::ArrayBuffer::create(realm(), message); - event_init.origin = url(); - dispatch_event(HTML::MessageEvent::create(realm(), HTML::EventNames::message, event_init).release_value_but_fixme_should_propagate_errors()); + event_init.origin = String::from_deprecated_string(url()).release_value_but_fixme_should_propagate_errors(); + dispatch_event(HTML::MessageEvent::create(realm(), String::from_deprecated_string(HTML::EventNames::message).release_value_but_fixme_should_propagate_errors(), event_init).release_value_but_fixme_should_propagate_errors()); return; } |