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 May 1, 2021
1 parent 16f6f1a commit ec140d7
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 @@ -881,8 +881,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 ec140d7

Please sign in to comment.