diff --git a/doc/api/globals.md b/doc/api/globals.md index f7d7dd33dd3f0a..47340c897b4a36 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -21,6 +21,14 @@ The objects listed here are specific to Node.js. There are [built-in objects][] that are part of the JavaScript language itself, which are also globally accessible. +## `__dirname` + +This variable may appear to be global but is not. See [`__dirname`][]. + +## `__filename` + +This variable may appear to be global but is not. See [`__filename`][]. + ## Class: `AbortController` -* Type: {boolean} True after the `AbortController` has been aborted. +* Type: {boolean} + +True after the `AbortController` has been aborted. -#### `abortSignal.onabort` +### `abortSignal.onabort` - -See {Blob}. - -## Class: `Buffer` - - - -* Type: {Function} - -Used to handle binary data. See the [buffer section][]. - -## Class: `ByteLengthQueuingStrategy` - - - -A browser-compatible implementation of [`ByteLengthQueuingStrategy`][]. - -## `__dirname` - -This variable may appear to be global but is not. See [`__dirname`][]. - -## `__filename` - -This variable may appear to be global but is not. See [`__filename`][]. - ## `atob(data)` + +See {Blob}. + ## Class: `BroadcastChannel` + +* Type: {Function} + +Used to handle binary data. See the [buffer section][]. + +## Class: `ByteLengthQueuingStrategy` + + + +A browser-compatible implementation of [`ByteLengthQueuingStrategy`][]. + ## `clearImmediate(immediateObject)` + +The WHATWG {DOMException} class. + ## `ErrorEvent` -* Type: {Array} +* Type: {string\[]} The `navigator.languages` read-only property returns an array of strings representing the preferred languages of the Node.js instance. @@ -781,36 +791,6 @@ The fallback value on builds without ICU is `['en-US']`. console.log(`The preferred languages are '${navigator.languages}'`); ``` -### `navigator.platform` - - - -* Type: {string} - -The `navigator.platform` read-only property returns a string identifying the -platform on which the Node.js instance is running. - -```js -console.log(`This process is running on ${navigator.platform}`); -``` - -### `navigator.userAgent` - - - -* Type: {string} - -The `navigator.userAgent` read-only property returns user agent -consisting of the runtime name and major version number. - -```js -console.log(`The user-agent is ${navigator.userAgent}`); // Prints "Node.js/21" -``` - ### `navigator.locks` + +* Type: {string} + +The `navigator.platform` read-only property returns a string identifying the +platform on which the Node.js instance is running. + +```js +console.log(`This process is running on ${navigator.platform}`); +``` + +### `navigator.userAgent` + + + +* Type: {string} + +The `navigator.userAgent` read-only property returns user agent +consisting of the runtime name and major version number. + +```js +console.log(`The user-agent is ${navigator.userAgent}`); // Prints "Node.js/21" +``` + +## `performance` + + + +The [`perf_hooks.performance`][] object. + ## Class: `PerformanceEntry` - -The [`perf_hooks.performance`][] object. - ## `process` -A browser-compatible implementation of {Response}. +A browser-compatible implementation of {Request}. -## Class: `Request` +## `require()` + +This variable may appear to be global but is not. See [`require()`][]. + +## Class: `Response` -A browser-compatible implementation of {Request}. +A browser-compatible implementation of {Response}. ## `sessionStorage` @@ -1164,14 +1174,6 @@ A browser-compatible implementation of {SubtleCrypto}. This global is available only if the Node.js binary was compiled with including support for the `node:crypto` module. -## Class: `DOMException` - - - -The WHATWG {DOMException} class. - ## Class: `TextDecoder`