镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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

  1. added
    workerIssues and PRs related to the worker_threads module and Worker API.
    on Feb 13, 2021
  2. jasnell commented on Feb 22, 2021

    @jasnell
    Member
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