GeezerVison is showing github.com — doc: explain how to disable navigator · nodejs/node@6e537ae
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/globals.md +10-2Lines changed: 10 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -600,7 +600,7 @@ This variable may appear to be global but is not. See [`module`][]. |
600 | 600 | added: v21.0.0 |
601 | 601 | --> |
602 | 602 |
|
603 | | -> Stability: 1 - Experimental |
| 603 | +> Stability: 1.1 - Active development |
604 | 604 |
|
605 | 605 | A partial implementation of the [Navigator API][]. |
606 | 606 |
|
@@ -610,10 +610,18 @@ A partial implementation of the [Navigator API][]. |
610 | 610 | added: v21.0.0 |
611 | 611 | --> |
612 | 612 |
|
613 | | -> Stability: 1 - Experimental |
| 613 | +> Stability: 1.1 - Active development |
614 | 614 |
|
615 | 615 | A partial implementation of [`window.navigator`][]. |
616 | 616 |
|
| 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 | + |
617 | 625 | ### `navigator.hardwareConcurrency` |
618 | 626 |
|
619 | 627 | <!-- YAML |
|