Commit 2a442b3
doc: update removeListener behaviour
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.
A test is also incuded to make this behaviour consistent in future
releases.
Fixes: #4759
PR-URL: #5201
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent f6ee099 commit 2a442b3Copy full SHA for 2a442b3
File tree
Expand file treeCollapse file tree
2 files changed
+56
-0
lines changedOpen diff view settings
Filter options
- doc/api
- test/parallel
Expand file treeCollapse file tree
2 files changed
+56
-0
lines changedOpen diff view settings
Collapse file
+37Lines changed: 37 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
377 | 377 | |
378 | 378 | |
379 | 379 | |
| 380 | + |
| 381 | + |
| 382 | + |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | + |
| 387 | + |
| 388 | + |
| 389 | + |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | + |
| 394 | + |
| 395 | + |
| 396 | + |
| 397 | + |
| 398 | + |
| 399 | + |
| 400 | + |
| 401 | + |
| 402 | + |
| 403 | + |
| 404 | + |
| 405 | + |
| 406 | + |
| 407 | + |
| 408 | + |
| 409 | + |
| 410 | + |
| 411 | + |
| 412 | + |
| 413 | + |
| 414 | + |
| 415 | + |
| 416 | + |
380 | 417 | |
381 | 418 | |
382 | 419 | |
|
Collapse file
test/parallel/test-event-emitter-remove-listeners.js
Copy file name to clipboardExpand all lines: test/parallel/test-event-emitter-remove-listeners.js+19Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
83 | 83 | |
84 | 84 | |
85 | 85 | |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
0 commit comments