Commit 3b461870 authored by Lance Ball's avatar Lance Ball Committed by Myles Borins
Browse files

doc: Backport ee.once doc clarifications to 4.x.

Addresses #5566. The `ee.once()` function is currently documented as
invoking the listener, and then removing it when the event is
triggered. However, this is not really the case. The listener is removed
and _then_ invoked. This only matters in a narrow set of use cases, but
when it matters, it matters that the docs are correct.

See the issue (#5566) for a discussion on why the code has not been
modified to match the documentation, but instead the documentation has
been modified to match the code.

Fixes: #5566
Ref: #6371
PR-URL: https://github.com/nodejs/node/pull/7103


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarRobert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarСковорода Никита Андреевич <chalkerx@gmail.com>
parent 4067cde7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment