From b1f5518a0a9226555e8b891ac0460f377cfd2d28 Mon Sep 17 00:00:00 2001 From: Dmitry Semigradsky Date: Wed, 11 Nov 2020 18:52:57 +0300 Subject: [PATCH] doc: fix `events.getEventListeners` example PR-URL: https://github.com/nodejs/node/pull/36085 Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yongsheng Zhang Reviewed-By: Antoine du Hamel --- doc/api/events.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index d8f8ee7e7c6582..5c6b058123ca57 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -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] } ```