Skip to content

Commit

Permalink
doc: fix events.getEventListeners example
Browse files Browse the repository at this point in the history
PR-URL: #36085
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
Semigradsky authored and targos committed Nov 14, 2020
1 parent f5191f5 commit b1f5518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,8 @@ const { getEventListeners, EventEmitter } = require('events');
{
const et = new EventTarget();
const listener = () => console.log('Events are fun');
ee.addEventListener('foo', listener);
getEventListeners(ee, 'foo'); // [listener]
et.addEventListener('foo', listener);
getEventListeners(et, 'foo'); // [listener]
}
```

Expand Down

0 comments on commit b1f5518

Please sign in to comment.