• Robert Knight's avatar
    Modernize WebSocket wrapper · dc169f99
    Robert Knight authored
    Modernize our auto-reconnecting wrapper for `WebSocket` to match current
    conventions in the client and improve the documentation.
    
     - Use named rather than default exports
     - Convert functions to arrow functions and remove unneeded `self`
       alias.
     - Add JSDoc comments and types
    
    A circular reference between the `connect` and `onAbnormalClose`
    functions was broken by adding a second argument to `onAbnormalClose`.
    dc169f99
websocket-test.js 3.5 KB