Skip to content

Commit

Permalink
doc: explain how to disable navigator
Browse files Browse the repository at this point in the history
PR-URL: #50310
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
GeoffreyBooth authored Oct 22, 2023
1 parent c206b2a commit 25576b5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions doc/api/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ This variable may appear to be global but is not. See [`module`][].
added: v21.0.0
-->

> Stability: 1 - Experimental
> Stability: 1.1 - Active development
A partial implementation of the [Navigator API][].

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

> Stability: 1 - Experimental
> Stability: 1.1 - Active development
A partial implementation of [`window.navigator`][].

If your app or a dependency uses a check for `navigator` to determine whether it
is running in a browser, the following can be used to delete the `navigator`
global before app code runs:

```bash
node --import 'data:text/javascript,delete globalThis.navigator' app.js
```

### `navigator.hardwareConcurrency`

<!-- YAML
Expand Down

0 comments on commit 25576b5

Please sign in to comment.