structuredClone()
Widely available
The structuredClone()
global method creates a deep copy of an object. Values that cannot be cloned can instead be transferred, making the original value no longer usable.
To learn more, see
Window: structuredClone() method at MDN.
Compatibility
- Chrome 98 Released on 2022-02-01
- Chrome Android 98 Released on 2022-02-01
- Edge 98 Released on 2022-02-03
- Firefox 94 Released on 2021-11-02
- Firefox for Android 94 Released on 2021-11-02
- Safari 15.4 Released on 2022-03-14
- Safari on iOS 15.4 Released on 2022-03-14
Specifications
- HTML Standard (#structured-cloning), from HTML Workstream (WHATWG).