code: function WsConnection (url, WS, opts) {
    this.connected = false
    this.emitter = new NanoEvents()
    if (WS) {
      this.WS = WS
    } else if (typeof WebSocket !== 'undefined') {
      this.WS = WebSocket
    } else {
      throw new Error('No WebSocket support')
    }
    this.url = url
    this.opts = opts
  }
docs: Logux connection for browser WebSocket.
  
  @param {string} url WebSocket server URL.
  @param {function} [WS] WebSocket class if you want change implementation.
  @param {object} opts Extra option for WebSocket constructor.
  
  @example
  import { WsConnection } from 'logux-core'
  
  const connection = new WsConnection('wss://logux.example.com/')
  const node = new ClientNode(nodeId, log, connection, opts)
  
  @class
  @extends Connection