diff --git a/doc/api/cli.md b/doc/api/cli.md index 1bd4864b2d1bca..1f5136ce69442f 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1196,6 +1196,16 @@ added: v19.0.0 Disable exposition of [CustomEvent Web API][] on the global scope. +### `--no-experimental-global-navigator` + + + +> Stability: 1 - Experimental + +Disable exposition of [Navigator API][] on the global scope. + ### `--no-experimental-global-webcrypto` -> Stability: 1.1 - Active development +> Stability: 1.1 - Active development. Disable this API with the +> [`--no-experimental-global-navigator`][] CLI flag. A partial implementation of the [Navigator API][]. @@ -610,18 +611,11 @@ A partial implementation of the [Navigator API][]. added: v21.0.0 --> -> Stability: 1.1 - Active development +> Stability: 1.1 - Active development. Disable this API with the +> [`--no-experimental-global-navigator`][] CLI flag. 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`