| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
as it is called is still a bit ambiguous. Could you use before here?
Sorry, something went wrong.
|
LGTM with a comment. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM but you may want to use doc: for your commit message; and if you want to reference the issue in it, I think it’s generally preferred to use the full github URL. You can also add an Fixes: header, I think. |
Sorry, something went wrong.
|
@addaleax yeah, I committed with 'docs:' instead of 'doc:'. I was aware that Fixes: was available, but since I can't really close the issue, I just referenced it. Do you need these things to change before merging the PR? |
Sorry, something went wrong.
|
@lance ... can you take a look at the new prependOnceListener() method description in the docs and see if it requires similar treatment? |
Sorry, something went wrong.
|
@lance No, all of that can be taken care of when landing the commit. 😄 |
Sorry, something went wrong.
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.
Based on comments from @cjihrig.
Additional documentation changes required for `ee.prependOnceListener` as per #5566.
|
@jasnell took a look and updated the documentation. Based on my reading of lib/events.js it seems the behavior would be identical. |
Sorry, something went wrong.
| *beginning* of the listeners array. This listener is invoked only the next time | ||
| `eventName` is triggered, after which it is removed. | ||
| *beginning* of the listeners array. This listener is removed, and then invoked | ||
| only the next time `eventName` is triggered. |
There was a problem hiding this comment.
To me this sounds a bit like the listener is removed instantly after being added. Maybe just copy the corresponding sentence for .once() from above?
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
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 PR-URL: #6371 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
|
Landed in 23818c6. |
Sorry, something went wrong.
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 PR-URL: #6371 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
|
does not land cleanly on v4.x-staging. Would someone be willing to backport? |
Sorry, something went wrong.
|
I'm going to mark this as don't land @lance / @nodejs/documentation please feel free to open a backport PR |
Sorry, something went wrong.
|
@thealphanerd - submitted backport PR here #7103 I have not submitted anything for backport before. I hope it's all up to snuff. |
Sorry, something went wrong.
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: #7103 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
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: #7103 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
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: #7103 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
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: #7103 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
doc
Description of change
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.