MessageEvent#ports should contain transferred ports #37358
Closed
Description
The following test currently fails:
'use strict';
const assert = require('assert');
const channel = new MessageChannel();
channel.port2.onmessage = function(event) {
assert.strictEqual(event.ports.length, 1);
};
const channel2 = new MessageChannel();
channel.port1.postMessage('', [channel2.port1]);
Reference: https://html.spec.whatwg.org/multipage/comms.html#dom-messageevent-ports