-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output result different from document in mjs example of Events
#49537
Labels
doc
Issues and PRs related to the documentations.
Comments
Hello, Can I work on this issue? |
nodejs-github-bot
pushed a commit
that referenced
this issue
Sep 19, 2023
PR-URL: #49548 Refs: #49537 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
Fixed by #49548 which seems to not have been linked |
ruyadorno
pushed a commit
that referenced
this issue
Sep 28, 2023
PR-URL: #49548 Refs: #49537 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this issue
Nov 1, 2023
PR-URL: nodejs#49548 Refs: nodejs#49537 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v20.5.1
Platform
ubuntu 20.04, Microsoft Windows NT 10.0.19045.0 x64
Subsystem
No response
What steps will reproduce the bug?
When performing the document example for event, the results are different.
node/doc/api/events.md
Lines 102 to 111 in e0fb3f7
Even if you print
console.log(this);
in the part where the callback is called in another mjs example, it is the same.node/doc/api/http.md
Lines 484 to 537 in e0fb3f7
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
// Prints: a b {}
What do you see instead?
// Prints: a b undefined
Additional information
In cjs examples,
this
is output as{}
, while in mjs examples,this
is output asundefined
. It is necessary to check whether the output asundefined
is a problem or normal, and if not, the document needs to be modified.The text was updated successfully, but these errors were encountered: