Skip to content

MessageEvent#ports should contain transferred ports #37358

@targos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    workerIssues and PRs related to Worker support.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions