News for hackers. Stuff that matters.
Re:Deep Cloning Objects in JavaScript, the Modern Way by hutzlibu on Friday December 22, 2023 @05:59AM (#38733017)
"Are you sure about this?"

No. And I hope to be wrong.

I will give it another try then, but I was using SharedArrayBuffer and I was getting explicit errors about this limitation.

Re:Deep Cloning Objects in JavaScript, the Modern Way by kaoD on Friday December 22, 2023 @07:01AM (#38733341)
Did a quick test and seems to work as expected: https://codesandbox.io/p/devbox/sharedarraybuffer-33qywc (see console in https://33qywc-3000.csb.app/)

Caveat is you need these headers for security reasons (hence why the sandbox above has Express) or SharedArrayBuffer is not even defined (at least in Firefox):

    Cross-Origin-Opener-Policy: same-origin
    Cross-Origin-Embedder-Policy: require-corp