diff options
| author | Yagiz Nizipli <yagiz@nizipli.com> | 2023-04-28 12:21:01 -0400 |
|---|---|---|
| committer | Yagiz Nizipli <yagiz@nizipli.com> | 2023-04-28 14:59:39 -0400 |
| commit | eb7379b62e356d973c91a2c1d433d8d2770cee18 (patch) | |
| tree | b763546dfc65fc860b7fb5dbfe2ffaa73328c264 /lib/internal/bootstrap/node.js | |
| parent | b31d587dc8c1b0f459243d2b96a17a7175c996cf (diff) | |
| download | node-new-navigator-platform.tar.gz | |
lib: add `navigator.platform`navigator-platform
Co-authored-by: Mestery <mestery@protonmail.com>
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Diffstat (limited to 'lib/internal/bootstrap/node.js')
| -rw-r--r-- | lib/internal/bootstrap/node.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 41a833885f..e25e0405c7 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -224,6 +224,15 @@ defineLazyProperties( ['structuredClone'], ); +// https://html.spec.whatwg.org/multipage/system-state.html#the-navigator-object +ObjectDefineProperty(globalThis, 'navigator', { + __proto__: null, + enumerable: true, + configurable: true, + writable: false, + value: require('internal/navigator'), +}); + // Set the per-Environment callback that will be called // when the TrackingTraceStateObserver updates trace state. // Note that when NODE_USE_V8_PLATFORM is true, the observer is |
