files/en-us/web/api/workerglobalscope/structuredclone/index.md
{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The structuredClone() method of the {{domxref("WorkerGlobalScope")}} interface creates a {{Glossary("deep copy")}} of a given value using the structured clone algorithm.
The method also allows transferable objects in the original value to be transferred rather than cloned to the new object. Transferred objects are detached from the original object and attached to the new object; they are no longer accessible in the original object.
structuredClone(value)
structuredClone(value, options)
value
options {{optional_inline}}
transfer
A {{Glossary("deep copy")}} of the original value.
DataCloneError {{domxref("DOMException")}}
See {{domxref("Window.structuredClone()")}} for details of this function.
See {{domxref("Window.structuredClone()")}} for examples.
{{Specifications}}
{{Compat}}