Closed mvayngrib closed 7 years ago
Can you please add in the description why this is a better error than before? Make an example?
@mcollina i did some more reading about the CloseEvent, and even though it has a code
and reason
, the spec seems to mandate that that code and reason give nearly zero information, for security reasons. I should have spotted that earlier. Basically, code
will typically be 1006 if onerror fired, and reason
an empty string.
for an example, you can see this: https://github.com/websockets/ws/blob/master/test/WebSocket.test.js#L1045
in the end, this change may be only an improvement in a few edge cases, so it's not as useful as i thought it'd be
CloseEvent has additional error information that is not available in onerror