mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb: Port CloseEvent to new String
This commit is contained in:
parent
d0f904dd4c
commit
e661f03ffa
Notes:
sideshowbarker
2024-07-17 06:33:00 +09:00
Author: https://github.com/kennethmyhra
Commit: e661f03ffa
Pull-request: https://github.com/SerenityOS/serenity/pull/17722
Reviewed-by: https://github.com/linusg ✅
4 changed files with 14 additions and 13 deletions
|
@ -221,8 +221,8 @@ void WebSocket::on_close(u16 code, DeprecatedString reason, bool was_clean)
|
|||
HTML::CloseEventInit event_init {};
|
||||
event_init.was_clean = was_clean;
|
||||
event_init.code = code;
|
||||
event_init.reason = move(reason);
|
||||
dispatch_event(HTML::CloseEvent::create(realm(), HTML::EventNames::close, event_init).release_value_but_fixme_should_propagate_errors());
|
||||
event_init.reason = String::from_deprecated_string(reason).release_value_but_fixme_should_propagate_errors();
|
||||
dispatch_event(HTML::CloseEvent::create(realm(), String::from_deprecated_string(HTML::EventNames::close.view()).release_value_but_fixme_should_propagate_errors(), event_init).release_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
|
||||
// https://websockets.spec.whatwg.org/#feedback-from-the-protocol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue