Broadcast Channel API
Checking compatibility...
Communicate between different browsing contexts (windows, tabs, iframes) using the Broadcast Channel API. Perfect for synchronizing state or sending messages across tabs.
The Broadcast Channel API requires multiple tabs or windows to be open for communication. Messages are only received by contexts that are actively listening on the same channel name.
Listening for Messages
This example shows how to receive messages from other tabs or windows of your app, allowing you to stay in sync with activity happening elsewhere.
=
=
=
=
=
=
Output
Click Run to see output...
Sending Messages
This example demonstrates how to broadcast messages to all other open tabs or windows of your app, keeping everyone updated with the latest information.
=
=
=
=
=
=
Output
Click Run to see output...