WebSocket.onerror

La propiedad WebSocket.onerror, del tipo event handler, será llamada cuando se dé un error. Esta llamada recibirá un tipo Event como argumento.

Sintaxis

aWebSocket.onerror = function(event) {
  console.error("Error en el WebSocket detectado:", event);
};

Valor

Especificaciones

Specification
WebSockets Standard
# dom-websocket-onerror

Compatibilidad con navegadores

BCD tables only load in the browser