BroadcastChannel interface represents a named channel that any browsing context of a given origin can subscribe to. It allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin. Messages are broadcasted via a
message event fired at all
BroadcastChannel objects listening to the channel.
Note:This feature is available in Web Workers.
- Creates an object linking to the named channel.
This interface also inherits properties from its parent,
EventHandlerproperty that specifies the function to execute when a
messageevent is fired on this object.
EventHandlercalled when a
MessageErroris fired—that is, when it receives a message that cannot be deserialized.
This interface also inherits methods from its parent,
|HTML Living Standard
The definition of 'BroadcastChannel' in that specification.
|Living Standard||Initial definition.|
BCD tables only load in the browser