Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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.

interface CloseEvent extends Event {
readonly code: number;
readonly reason: string;
readonly wasClean: boolean;
}
var CloseEvent: {
prototype: CloseEvent;
new (type: string, eventInitDict?: CloseEventInit): CloseEvent;
}
;

§Extends

§Properties

§
readonly code: number
[src]

Returns the WebSocket connection close code provided by the server.

§
readonly reason: string
[src]

Returns the WebSocket connection close reason provided by the server.

§
readonly wasClean: boolean
[src]

Returns true if the connection closed cleanly; false otherwise.