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 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.