Skip to content

Commit d465e3f

Browse files
committed
fix structuredClone
1 parent 557edc9 commit d465e3f

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

reference-implementation/lib/abstract-ops/miscellaneous.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,5 @@ exports.CloneAsUint8Array = O => {
2222
};
2323

2424
exports.StructuredTransferOrClone = (value, transferList) => {
25-
console.log(globalThis);
26-
console.log(globalThis.structuredClone);
27-
28-
if (globalThis.structuredClone)
29-
return globalThis.structuredClone(value, transferList);
30-
31-
return JSON.parse(JSON.stringify(value));
25+
return globalThis.structuredClone(value, transferList);
3226
};

reference-implementation/run-web-platform-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ async function main() {
5858
}
5959
};
6060
};
61+
window.structuredClone = structuredClone;
6162
window.eval(bundledJS);
6263
},
6364
filter(testPath) {

0 commit comments

Comments
 (0)