variable BroadcastChannel
type
🔗
{ readonly prototype: BroadcastChannel; new (name: string): BroadcastChannel; }
{ readonly prototype: BroadcastChannel; new (name: string): BroadcastChannel; }
onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null
onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null
postMessage(message: any): void
Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
addEventListenerType Parameters
🔗
K extends keyof BroadcastChannelEventMap
(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
removeEventListenerType Parameters
🔗
K extends keyof BroadcastChannelEventMap
(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void