Closed
Description
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)
);
}
});