Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /webmessaging/MessagePort_onmessage_start.any.html - WPT Dashboard Interop Dashboard
- /webmessaging/MessagePort_onmessage_start.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=MessageChannel: port.onmessage enables message queue
// TODO: duplicate of ./message-channels/implied-start.any.js?
async_test(function(t) {
var channel = new MessageChannel();
channel.port2.onmessage = t.step_func_done();
channel.port1.postMessage("ping");
t.step_timeout(t.unreached_func(), 1000);
});