interface dom.BroadcastChannel
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.5.2/mod.ts";
const { BroadcastChannel } = dom;
Properties
onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null
onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null
Methods
Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
addEventListener<K extends keyof BroadcastChannelEventMap>(): void
type: K,
listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof BroadcastChannelEventMap>(): void
type: K,
listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any,
options?: boolean | EventListenerOptions,