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 <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Semigradsky authored and nodejs-github-bot committed Nov 11, 2020
1 parent c0ac692 commit a8b8b8b
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 a8b8b8b

Please sign in to comment.