Frontend & browser·JavaScript in the browser
you posted the object to a worker and got a real deep copy on the other side, but the functions were gone.
Structured clone
Also calledstructuredClone, structured cloning algorithm
The browser's own deep-copy algorithm, used when passing data to workers, into IndexedDB, or through `structuredClone()`. It handles cycles, dates, maps, sets and typed arrays, which JSON round-tripping does not. It throws on functions, DOM nodes and class instances, which is why an innocuous `postMessage` can fail on an object that looked like plain data.