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

WebSocketLike

interface WebSocketLike {
binaryType?: string;
bufferedAmount?: number;
readonly CLOSED: number;
readonly CLOSING: number;
readonly CONNECTING: number;
dispatchEvent?: (event: Event) => boolean;
extensions?: string;
onclose: ((this: any, ev: CloseEvent) => any) | null;
onerror: ((this: any, ev: Event) => any) | null;
onmessage: ((this: any, ev: MessageEvent) => any) | null;
onopen: ((this: any, ev: Event) => any) | null;
readonly OPEN: number;
readonly protocol: string;
readonly readyState: number;
readonly url: string;
addEventListener(type: string, listener: EventListener): void;
close(code?: number, reason?: string): void;
removeEventListener(type: string, listener: EventListener): void;
send(data:
| string
| ArrayBufferLike
| Blob
| ArrayBufferView
): void;
}

§Properties

§
binaryType?: string
[src]
§
bufferedAmount?: number
[src]
§
readonly CLOSED: number
[src]
§
readonly CLOSING: number
[src]
§
readonly CONNECTING: number
[src]
§
dispatchEvent?: (event: Event) => boolean
[src]
§
extensions?: string
[src]
§
onclose: ((this: any, ev: CloseEvent) => any) | null
[src]
§
onerror: ((this: any, ev: Event) => any) | null
[src]
§
onmessage: ((this: any, ev: MessageEvent) => any) | null
[src]
§
onopen: ((this: any, ev: Event) => any) | null
[src]
§
readonly OPEN: number
[src]
§
readonly protocol: string
[src]
§
readonly readyState: number
[src]
§
readonly url: string
[src]

§Methods

§
addEventListener(type: string, listener: EventListener): void
[src]
§
close(code?: number, reason?: string): void
[src]
§
removeEventListener(type: string, listener: EventListener): void
[src]
§
send(data:
| string
| ArrayBufferLike
| Blob
| ArrayBufferView
): void
[src]