Web APIs

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.

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...