Skip to content
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

doc: improvements to events.markdown copy #4468

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Dec 29, 2015

General improvements to events.markdown copy including a
bit of restructuring and improved examples

@jasnell jasnell added doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter. labels Dec 29, 2015
@MylesBorins
Copy link
Contributor

LGTM

My only comment is that it seems like the first example might have too much inheritance logic that the basic emitter logic could be lost on a newer developer. Perhaps the first example should simply show setting up an instance of emitter?

// Prints: 2

Using the `eventEmitter.once()` method, it is possible to register a listener
that is immediate unregistered after it is called.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

immediately

@Qard
Copy link
Member

Qard commented Dec 30, 2015

One minor nit, but LGTM other than that.

@jasnell
Copy link
Member Author

jasnell commented Dec 30, 2015

@thealphanerd ... given that inheriting from EventEmitter is the most common use case, I'd rather show that right up front

General improvements to events.markdown copy including a
bit of restructuring and improved examples
@jasnell
Copy link
Member Author

jasnell commented Dec 30, 2015

@Qard ... nit addressed.

@Qard
Copy link
Member

Qard commented Dec 30, 2015

LGTM

@MylesBorins
Copy link
Contributor

@jasnell that is reasonable enough, and how it was done before. LGTM

jasnell added a commit that referenced this pull request Dec 30, 2015
General improvements to events.markdown copy including a
bit of restructuring and improved examples

PR-URL: #4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@jasnell
Copy link
Member Author

jasnell commented Dec 30, 2015

Landed in a0130e1

@jasnell jasnell closed this Dec 30, 2015
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Jan 6, 2016
General improvements to events.markdown copy including a
bit of restructuring and improved examples

PR-URL: nodejs#4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
MylesBorins pushed a commit that referenced this pull request Jan 13, 2016
General improvements to events.markdown copy including a
bit of restructuring and improved examples

PR-URL: #4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
General improvements to events.markdown copy including a
bit of restructuring and improved examples

PR-URL: #4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@MylesBorins MylesBorins mentioned this pull request Jan 19, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
General improvements to events.markdown copy including a
bit of restructuring and improved examples

PR-URL: nodejs#4468
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants