diff --git a/doc/api/cli.md b/doc/api/cli.md index 3cb36818ae4997..023dfd103112c5 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -646,6 +646,16 @@ CommonJS. This includes `import` and `export` statements and `import.meta` references. It does _not_ include `import()` expressions, which are valid in CommonJS. +### `--experimental-global-navigator` + + + +> Stability: 1 - Experimental + +Enable exposition of [Navigator API][] on the global scope. + ### `--experimental-import-meta-resolve` -> Stability: 1.1 - Active development +> Stability: 1.1 - Active development. Use `--experimental-global-navigator` to +> enable this feature. A partial implementation of the [Navigator API][]. @@ -608,20 +613,17 @@ A partial implementation of the [Navigator API][]. -> Stability: 1.1 - Active development +> Stability: 1.1 - Active development. Use `--experimental-global-navigator` to +> enable this feature. 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`