Skip to main content
Module

x/evt/lib/types/lib.dom.ts>CloseEvent

💧EventEmitter's typesafe replacement
Go to Latest
interface CloseEvent
implements Event
import { type CloseEvent } from "https://deno.land/x/evt@v2.4.3/lib/types/lib.dom.ts";

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.

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.