Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

329 B
Raw Blame
// 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);
});