Workers & Background
MessageChannel API
Create direct two-way channel communication ports between workers/iframes.
Checking support...
Feature Not SupportedThis browser does not support the MessageChannel API Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
Advertisement
Interactive Input Workspace
Ready for input
Web API Execution Output
Result output will be displayed here after processing...
Native JavaScript Code Example (Zero Libraries)
const channel = new MessageChannel();
worker.postMessage('port', [channel.port2]);About the MessageChannel API Web API
MessageChannel allows establishing a 2-way message channel between ports.
Specification:W3C & WHATWG Web API Standard
Sponsored Content