diff options
| author | Ethan Arrowood <ethan@arrowood.dev> | 2021-08-13 11:31:04 -0600 |
|---|---|---|
| committer | James M Snell <jasnell@gmail.com> | 2021-08-28 08:55:01 -0700 |
| commit | d0a898681f8d5a5fcd53fa2ab8e0a3da807791be (patch) | |
| tree | 9f5023c6c597e1a7904f12b57df507c1323828a0 /lib/internal/bootstrap/node.js | |
| parent | 21cf618c22d666a31f2182b7171571aafe58fa7a (diff) | |
| download | node-new-d0a898681f8d5a5fcd53fa2ab8e0a3da807791be.tar.gz | |
lib: add structuredClone() global
PR-URL: https://github.com/nodejs/node/pull/39759
Fixes: https://github.com/nodejs/node/issues/39713
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Diffstat (limited to 'lib/internal/bootstrap/node.js')
| -rw-r--r-- | lib/internal/bootstrap/node.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index ab63dd0604..ae4eac5028 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -254,6 +254,11 @@ if (!config.noBrowserGlobals) { // Non-standard extensions: defineOperation(globalThis, 'clearImmediate', timers.clearImmediate); defineOperation(globalThis, 'setImmediate', timers.setImmediate); + + const { + structuredClone, + } = require('internal/structured_clone'); + defineOperation(globalThis, 'structuredClone', structuredClone); } // Set the per-Environment callback that will be called |
