You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventClient::set_on_error should take a Option<Box<dyn Fn(Event)>>, not a Option<Box<dyn Fn(ErrorEvent)>>.
Calling any of the ErrorEvent specific methods (e.g., message) from within an onerror handler causes programs to die. Calling Event specific methods (e.g., type_, time_stamp) work fine. According to MDN, the type of the error event is "A generic Event".
FWIW, there's a chance that an ErrorEvent has been passed in the past, because I have some code from January 2022 that calls .message() that I think used to work. It's hard for me to be sure that it worked, because it's in error handling code that rarely gets called. I certainly would like to think that I'd have noticed it if it has been broken for two and a half years, but I can't guarantee that.
The text was updated successfully, but these errors were encountered:
ctm
added a commit
to ctm/wasm-sockets
that referenced
this issue
Jul 31, 2024
EventClient::set_on_error
should take aOption<Box<dyn Fn(Event)>>
, not aOption<Box<dyn Fn(ErrorEvent)>>
.Calling any of the
ErrorEvent
specific methods (e.g.,message
) from within an onerror handler causes programs to die. CallingEvent
specific methods (e.g.,type_
,time_stamp
) work fine. According to MDN, the type of the error event is "A genericEvent
".FWIW, there's a chance that an ErrorEvent has been passed in the past, because I have some code from January 2022 that calls
.message()
that I think used to work. It's hard for me to be sure that it worked, because it's in error handling code that rarely gets called. I certainly would like to think that I'd have noticed it if it has been broken for two and a half years, but I can't guarantee that.The text was updated successfully, but these errors were encountered: