Web APIs

Channel Messaging API

Checking compatibility...

Enable direct communication between different browsing contexts (like iframes and workers) using two-way channels with a port at each end. Perfect for secure cross-context messaging.

Basic Channel Communication

This example shows how to set up a direct messaging connection between your main page and an embedded iframe, allowing them to exchange information privately.

=
=
=
=
=
=

Output

Click Run to see output...

Interactive Messaging

This example creates a complete chat interface between your main page and an iframe, demonstrating how to build interactive communication systems within your app.

=
=
=
=
=
=

Output

Click Run to see output...