You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed here whatwg/html#793 and here nodejs/node#34355, there are now faster, native methods for running structured clone in both Node.js and the browser.
I'd like to propose we modify this repo to use the native MessageChannel interfaces to provide an async interface for both browser and Node.js environments, and the sync interface for Node.js environments, if it is supported. The sync interface for the browser, and in environments that don't support MessageChannel, would fall back to the existing implementation.
It would be very convenient for the package named structured-clone on NPM to support all these cases in the fastest way possible :)
Happy to help implement. Interested in contributions?
The text was updated successfully, but these errors were encountered:
Hey @tcr!
As discussed here whatwg/html#793 and here nodejs/node#34355, there are now faster, native methods for running structured clone in both Node.js and the browser.
I'd like to propose we modify this repo to use the native
MessageChannel
interfaces to provide an async interface for both browser and Node.js environments, and the sync interface for Node.js environments, if it is supported. The sync interface for the browser, and in environments that don't supportMessageChannel
, would fall back to the existing implementation.It would be very convenient for the package named
structured-clone
on NPM to support all these cases in the fastest way possible :)Happy to help implement. Interested in contributions?
The text was updated successfully, but these errors were encountered: