Interface

CloseEvent

CloseEvent

A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.

View Source js/lib.dom.d.ts, line 849

Members

number

# code

Returns the WebSocket connection close code provided by the server.

View Source js/lib.dom.d.ts, line 852

string

# reason

Returns the WebSocket connection close reason provided by the server.

View Source js/lib.dom.d.ts, line 857

boolean

# wasClean

Returns true if the connection closed cleanly; false otherwise.

View Source js/lib.dom.d.ts, line 862