Event type for WebSocket error events. This event indicates when a server-side error has occurred resulting in closure of the WebSocket connection. Listen for this event by using addEventListener with error, or by setting the onerror property.
Example
websocket.onerror = (event) => { print("The connection has been closed due to an error: " + error); };
Event type for WebSocket error events. This event indicates when a server-side error has occurred resulting in closure of the WebSocket connection. Listen for this event by using
addEventListener
witherror
, or by setting theonerror
property.Example