Skip to content

structuredClone Serializing a non-serializable platform object succeeds #55120

Closed
@avivkeller

Description

@avivkeller

In Node.js, the following snippet succeeds, whereas, in the browser, it throws a DataCloneError:

structuredClone(new Response());

This is causing the following WPT to fail:

structuredCloneBatteryOfTests.push({
  description: 'Serializing a non-serializable platform object fails',
  async f(runner, t) {
    const request = new Response();
    await promise_rejects_dom(
      t,
      "DataCloneError",
      runner.structuredClone(request)
    );
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.web-standardsIssues and PRs related to Web APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions