code: func (ws *WebSocket) Close() (err error) {
  	defer func() {
  		e := recover()
  		if e == nil {
  			return
  		}
  		if jsErr, ok := e.(*js.Error); ok && jsErr != nil {
  			err = jsErr
  		} else {
  			panic(e)
  		}
  	}()
  
  	// Use close code closeNormalClosure to indicate that the purpose
  	// for which the connection was established has been fulfilled.
  	// See https://tools.ietf.org/html/rfc6455#section-7.4.
  	ws.Object.Call("close", closeNormalClosure)
  	return
  }
docs: // Close closes the underlying WebSocket.
  //
  // See: http://dev.w3.org/html5/websockets/#dom-websocket-close