Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /webmessaging/message-channels/dictionary-transferrable.any.html - WPT Dashboard Interop Dashboard
- /webmessaging/message-channels/dictionary-transferrable.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=basic messagechannel with transfer
async_test(function(t) {
var channel = new MessageChannel();
var ab = new ArrayBuffer(1);
channel.port1.postMessage(ab, {transfer: [ab]});
channel.port2.onmessage = t.step_func(
function(e) {
assert_equals(e.data.byteLength, 1);
t.done();
});
channel.port2.start();
});