Skip to content

MessageEvent#ports should contain transferred ports #37358

Description

@targos

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    workerIssues and PRs related to the worker_threads module and Worker API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions