Properties Jump to heading
readonly
Jump to headingname: stringReturns the channel name (as passed to the constructor).
Jump to headingonmessage: ((this: BroadcastChannel,ev: MessageEvent,) => any) | nullJump to headingonmessageerror: ((this: BroadcastChannel,ev: MessageEvent,) => any) | nullMethods Jump to heading
Jump to headingclose(): voidCloses the BroadcastChannel object, opening it up to garbage collection.
Jump to headingpostMessage(message: any): voidSends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
Jump to headingaddEventListener<K extends keyof BroadcastChannelEventMap>(type: K,listener: (this: BroadcastChannel,ev: BroadcastChannelEventMap[K],) => any,options?: boolean | AddEventListenerOptions,): voidJump to headingaddEventListener(type: string,listener: EventListenerOrEventListenerObject,options?: boolean | AddEventListenerOptions,): voidJump to headingremoveEventListener<K extends keyof BroadcastChannelEventMap>(type: K,listener: (this: BroadcastChannel,ev: BroadcastChannelEventMap[K],) => any,options?: boolean | EventListenerOptions,): void