Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/index.ts>dom.RTCDataChannel

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.RTCDataChannel
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.7/lib/index.ts";
const { RTCDataChannel } = dom;

Properties

binaryType: string
readonly
bufferedAmount: number
bufferedAmountLowThreshold: number
readonly
id: number | null
readonly
label: string
readonly
maxPacketLifeTime: number | null
readonly
maxRetransmits: number | null
readonly
negotiated: boolean
onbufferedamountlow: ((this: RTCDataChannel, ev: Event) => any) | null
onclose: ((this: RTCDataChannel, ev: Event) => any) | null
onerror: ((this: RTCDataChannel, ev: RTCErrorEvent) => any) | null
onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null
onopen: ((this: RTCDataChannel, ev: Event) => any) | null
readonly
ordered: boolean
readonly
priority: RTCPriorityType
readonly
protocol: string
readonly
readyState: RTCDataChannelState

Methods

close(): void
send(data: string): void
send(data: Blob): void
send(data: ArrayBuffer): void
send(data: ArrayBufferView): void
addEventListener<K extends keyof RTCDataChannelEventMap>(
type: K,
listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof RTCDataChannelEventMap>(
type: K,
listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void