From 9cbb301f08ecd5246bab36867f5174f2fcbb488a Mon Sep 17 00:00:00 2001 From: dheeraj br Date: Thu, 30 Apr 2020 02:23:13 +0530 Subject: [PATCH 1/4] reword explanation Rewording of emitter.removeListener(eventName, listener) explanation to make it easier to understand --- doc/api/events.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index a30e2abb01353c..ba1e1728eee7bb 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -672,9 +672,7 @@ called multiple times to remove each instance. Once an event has been emitted, all listeners attached to it at the time of emitting will be called in order. This implies that any -`removeListener()` or `removeAllListeners()` calls *after* emitting and -*before* the last listener finishes execution will not remove them from -`emit()` in progress. Subsequent events will behave as expected. +`removeListener()` or `removeAllListeners()` will not remove listners from currently executing `emit()`'s list of listners, on subsequent calls to `emit()` the listeners marked for removal will not be called. ```js const myEmitter = new MyEmitter(); From f056faf939dbee885bf29122495c4e53e1007af8 Mon Sep 17 00:00:00 2001 From: dheeraj br Date: Thu, 30 Apr 2020 21:10:38 +0530 Subject: [PATCH 2/4] Update doc/api/events.md Co-authored-by: James M Snell --- doc/api/events.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/events.md b/doc/api/events.md index ba1e1728eee7bb..f34ee1feb0fac9 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -672,7 +672,9 @@ called multiple times to remove each instance. Once an event has been emitted, all listeners attached to it at the time of emitting will be called in order. This implies that any -`removeListener()` or `removeAllListeners()` will not remove listners from currently executing `emit()`'s list of listners, on subsequent calls to `emit()` the listeners marked for removal will not be called. +`removeListener()` or `removeAllListeners()` will not remove listeners from +currently executing `emit()`'s list of listeners, on subsequent calls to +`emit()` the listeners marked for removal will not be called. ```js const myEmitter = new MyEmitter(); From a0ca9e3d15208cfb7e264a622ed953b5991a0385 Mon Sep 17 00:00:00 2001 From: dheeraj br Date: Sun, 3 May 2020 06:40:19 +0530 Subject: [PATCH 3/4] Update doc/api/events.md Co-authored-by: Rich Trott --- doc/api/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/events.md b/doc/api/events.md index f34ee1feb0fac9..b5eec45bf3ad95 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -673,7 +673,7 @@ called multiple times to remove each instance. Once an event has been emitted, all listeners attached to it at the time of emitting will be called in order. This implies that any `removeListener()` or `removeAllListeners()` will not remove listeners from -currently executing `emit()`'s list of listeners, on subsequent calls to +currently executing `emit()`'s list of listeners. On subsequent calls to `emit()` the listeners marked for removal will not be called. ```js From e66cd2a824ffbeae0f64e4cc2c219d3f24f1b683 Mon Sep 17 00:00:00 2001 From: dheeraj br Date: Sun, 3 May 2020 06:40:28 +0530 Subject: [PATCH 4/4] Update doc/api/events.md Co-authored-by: Rich Trott --- doc/api/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/events.md b/doc/api/events.md index b5eec45bf3ad95..c20cd80c8176d8 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -674,7 +674,7 @@ Once an event has been emitted, all listeners attached to it at the time of emitting will be called in order. This implies that any `removeListener()` or `removeAllListeners()` will not remove listeners from currently executing `emit()`'s list of listeners. On subsequent calls to -`emit()` the listeners marked for removal will not be called. +`emit()`, the listeners marked for removal will not be called. ```js const myEmitter = new MyEmitter();