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: fix `events.once()` example using `AbortSignal` · nodejs/node@b963db9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • events.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/events.md‎

Copy file name to clipboardExpand all lines: doc/api/events.md
+2-4Lines changed: 2 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1455,8 +1455,7 @@ async function foo(emitter, event, signal) {
14551455
}
14561456

14571457
foo(ee, 'foo', ac.signal);
1458-
ac.abort(); // Abort waiting for the event
1459-
ee.emit('foo'); // Prints: Waiting for the event was canceled!
1458+
ac.abort(); // Prints: Waiting for the event was canceled!
14601459
```
14611460

14621461
```cjs
@@ -1479,8 +1478,7 @@ async function foo(emitter, event, signal) {
14791478
}
14801479

14811480
foo(ee, 'foo', ac.signal);
1482-
ac.abort(); // Abort waiting for the event
1483-
ee.emit('foo'); // Prints: Waiting for the event was canceled!
1481+
ac.abort(); // Prints: Waiting for the event was canceled!
14841482
```
14851483

14861484
### Awaiting multiple events emitted on `process.nextTick()`

0 commit comments

Comments
0 (0)
You are visitor 01402520 — 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.