An interface used internally to exchange low level messages across contexts.
Signature:
export interface Messenger
Having a single interface lets post-me deal with Workers, Windows, and MessagePorts without having to worry about their differences.
A few concrete implementations of the Messenger interface are provided.
| Method | Description |
|---|---|
| addMessageListener(listener) | Add a listener to messages received by the other context |
| postMessage(message, transfer) | Send a message to the other context |