Skip to main content

structuredClone()

Deep-copies a value with the structured clone algorithm (Maps, Dates, cycles, typed arrays). Specification: html.spec.whatwg.org/multipage/structured-data.html.

Results​

Probed on 2026-10-19 with Node.js v22.23.3.

warpdom 0.1.6​

Missing

Missing: in this engine's window, this does not hold: typeof window.structuredClone is defined.

Report a wrong result for warpdom

happy-dom 21.0.3​

Missing

Missing: in this engine's window, this does not hold: typeof window.structuredClone is defined.

Report a wrong result for happy-dom

jsdom 30.1.3​

Missing

Missing: in this engine's window, this does not hold: typeof window.structuredClone is defined.

Report a wrong result for jsdom

linkedom 0.18.13​

Supported

2 of 2 checks work.

The window's value is Node.js's own global (identical object), not the engine's implementation.

Report a wrong result for linkedom

Checks​

Exists when: typeof window.structuredClone is defined.

  • map-date-cycle: Clones a Map, a Date and a circular reference into new objects with the same contents. (spec)
  • function-throws: Cloning a function throws a "DataCloneError" DOMException. (spec)

Node.js globals​

Node.js defines structuredClone itself. Depending on the test runner and its environment, tests may see Node's version even where the engine's window has none; these results describe the engine's window only.

Working around it in tests​

Node.js has structuredClone as a global since 17. Under Jest's jsdom environment it is not copied in; assigning the Node global in a setup file (globalThis.structuredClone ??= ...) is common, or the core-js polyfill.