Skip to main content
interface CloseEvent
implements Event

Properties

readonly
code: number

Returns the WebSocket connection close code provided by the server.

readonly
reason: string

Returns the WebSocket connection close reason provided by the server.

readonly
wasClean: boolean

Returns true if the connection closed cleanly; false otherwise.

variable CloseEvent

type

{ readonly prototype: CloseEvent; new (type: string, eventInitDict?: CloseEventInit): CloseEvent; }