Hi guys, is it normal that the WebSocket API’s `on...
# javascript
j
Hi guys, is it normal that the WebSocket API’s
onclose
and
onerror
are typed with
(Event) -> dynamic
instead of using
CloseEvent
and
ErrorEvent
respectively? https://kotlinlang.org/api/latest/jvm/stdlib/org.w3c.dom/-web-socket/ I have to
unsafeCast
them to be able to extract the values and it feels wrong. Am I missing something? Is there an actual possibility for having some other kind of events there?
u
@Joffrey there are two options 1) we indeed found that this is not always a case but forget to document the reasoning 2) we just missed that this can be improved. I'll update you on this. 1) is highly unlikely so we might just improve this. Will keep you posted.
👍 2
j
Great to hear, thanks!
@[JB] Shagen Is there any place where I can track this? Is there a YouTrack issue for instance?