Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: explain how to disable navigator #50310

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading