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.
주의: 이 기능은 Web Worker에서 사용할 수 있습니다
- Creates an object linking to the named channel.
This interface also inherits properties from its parent,
- Returns a
DOMString, the name of the channel.
event handlerproperty that specifies the function to execute when a
messageevent is fired on this object.
event handlercalled 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