Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/ext/websocket/lib.deno_websocket.d.ts>CloseEvent

A modern runtime for JavaScript and TypeScript.
Go to Latest
class CloseEvent
extends Event
import { CloseEvent } from "https://deno.land/x/deno@v1.29.0/ext/websocket/lib.deno_websocket.d.ts";

Constructors

new
CloseEvent(type: string, eventInitDict?: CloseEventInit)

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.