GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: update output of example in AbortController · nodejs/node@a21459e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • globals.md
  • lib/internal
    • abort_controller.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/globals.md‎

Copy file name to clipboardExpand all lines: doc/api/globals.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ac.signal.addEventListener('abort', () => console.log('Aborted!'),
4343

4444
ac.abort();
4545

46-
console.log(ac.signal.aborted); // Prints True
46+
console.log(ac.signal.aborted); // Prints true
4747
```
4848

4949
### `abortController.abort([reason])`
@@ -196,7 +196,7 @@ An optional reason specified when the `AbortSignal` was triggered.
196196
```js
197197
const ac = new AbortController();
198198
ac.abort(new Error('boom!'));
199-
console.log(ac.signal.reason); // Error('boom!');
199+
console.log(ac.signal.reason); // Error: boom!
200200
```
201201

202202
#### `abortSignal.throwIfAborted()`
Collapse file

‎lib/internal/abort_controller.js‎

Copy file name to clipboardExpand all lines: lib/internal/abort_controller.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class AbortSignal extends EventTarget {
163163
}
164164

165165
/**
166-
* @param {any} reason
166+
* @param {any} [reason]
167167
* @returns {AbortSignal}
168168
*/
169169
static abort(
@@ -326,7 +326,7 @@ class AbortController {
326326
}
327327

328328
/**
329-
* @param {any} reason
329+
* @param {any} [reason]
330330
*/
331331
abort(reason = new DOMException('This operation was aborted', 'AbortError')) {
332332
abortSignal(this.#signal ??= createAbortSignal(), reason);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.