Closed tothandras closed 8 years ago
why can't we just use this.onopen()
and the like?
I'm 👎 on monkey patching the socket object.
Alright, that's why I asked. :) And what about the changes?
Changed are ok. However I will prefer to have a single way to set the events. Is that possible? Why can't we always use onopen
and the like?
I don't see
Not true: https://github.com/maxogden/websocket-stream/issues/87#issuecomment-216544499onopen
and the like here: https://github.com/websockets/ws/blob/master/lib/WebSocket.js. :/
Anything else? @mcollina
Let's wait @mafintosh and @maxogden :)
Fixes #87 Replace
addEventListener
calls withonopen
,onclose
,onerror
,onmessage
.