Skip to content

Commit 25576b5

Browse files
doc: explain how to disable navigator
PR-URL: nodejs#50310 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent c206b2a commit 25576b5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/api/globals.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ This variable may appear to be global but is not. See [`module`][].
600600
added: v21.0.0
601601
-->
602602

603-
> Stability: 1 - Experimental
603+
> Stability: 1.1 - Active development
604604
605605
A partial implementation of the [Navigator API][].
606606

@@ -610,10 +610,18 @@ A partial implementation of the [Navigator API][].
610610
added: v21.0.0
611611
-->
612612

613-
> Stability: 1 - Experimental
613+
> Stability: 1.1 - Active development
614614
615615
A partial implementation of [`window.navigator`][].
616616

617+
If your app or a dependency uses a check for `navigator` to determine whether it
618+
is running in a browser, the following can be used to delete the `navigator`
619+
global before app code runs:
620+
621+
```bash
622+
node --import 'data:text/javascript,delete globalThis.navigator' app.js
623+
```
624+
617625
### `navigator.hardwareConcurrency`
618626

619627
<!-- YAML

0 commit comments

Comments
 (0)