| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dab3186 commit 035356f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -473,10 +473,12 @@ added: v0.1.27 | |||
| 473 | 473 | ||
| 474 | 474 | * {Object} The global namespace object. | |
| 475 | 475 | ||
| 476 | - In browsers, the top-level scope is the global scope. This means that | ||
| 477 | - within the browser `var something` will define a new global variable. In | ||
| 478 | - Node.js this is different. The top-level scope is not the global scope; | ||
| 479 | - `var something` inside a Node.js module will be local to that module. | ||
| 476 | + In browsers, the top-level scope has traditionally been the global scope. This | ||
| 477 | + means that `var something` will define a new global variable, except within | ||
| 478 | + ECMAScript modules. In Node.js, this is different. The top-level scope is not | ||
| 479 | + the global scope; `var something` inside a Node.js module will be local to that | ||
| 480 | + module, regardless of whether it is a [CommonJS module][] or an | ||
| 481 | + [ECMAScript module][]. | ||
| 480 | 482 | ||
| 481 | 483 | ## Class `Headers` | |
| 482 | 484 | ||
@@ -868,6 +870,8 @@ added: v18.0.0 | |||
| 868 | 870 | ||
| 869 | 871 | A browser-compatible implementation of [`WritableStreamDefaultWriter`][]. | |
| 870 | 872 | ||
| 873 | + [CommonJS module]: modules.md | ||
| 874 | + [ECMAScript module]: esm.md | ||
| 871 | 875 | [Web Crypto API]: webcrypto.md | |
| 872 | 876 | [`--experimental-global-customevent`]: cli.md#--experimental-global-customevent | |
| 873 | 877 | [`--experimental-global-webcrypto`]: cli.md#--experimental-global-webcrypto | |
| Back | FazBrowse Home | New Git URL |
0 commit comments