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

lib: add ability to add separate event name to defineEventHandler #45032

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 16, 2022

Adds an optional third argument to defineEventHandler() to specify an event name that is separate from the name used for the property. This will be used, for instance, by the quic implementation to support generating the on... events where the event name itself is hyphenated. For instance defineEventHandler(target, 'streamreset', 'stream-reset')

Separated out from #44325

This is an internal only api so no documentation change is needed.

Signed-off-by: James M Snell jasnell@gmail.com

Adds an optional third argument to `defineEventHandler()` to specify
an event name that is separate from the name used for the property.
This will be used, for instance, by the quic implementation to support
generating the `on...` events where the event name itself is hyphenated.
For instance `defineEventHandler(target, 'streamreset', 'stream-reset')`

Separated out from nodejs#44325

Signed-off-by: James M Snell <jasnell@gmail.com>
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 16, 2022
@jasnell jasnell mentioned this pull request Oct 16, 2022
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2022
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgmt

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2022
@nodejs-github-bot

This comment was marked as outdated.

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 17, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Oct 17, 2022

@jasnell jasnell removed the needs-ci PRs that need a full CI run. label Oct 17, 2022
@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 19, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 19, 2022
@nodejs-github-bot nodejs-github-bot merged commit 1f7e8d6 into nodejs:main Oct 19, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 1f7e8d6

RafaelGSS pushed a commit that referenced this pull request Nov 1, 2022
Adds an optional third argument to `defineEventHandler()` to specify
an event name that is separate from the name used for the property.
This will be used, for instance, by the quic implementation to support
generating the `on...` events where the event name itself is hyphenated.
For instance `defineEventHandler(target, 'streamreset', 'stream-reset')`

Separated out from #44325

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #45032
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Nov 1, 2022
RafaelGSS pushed a commit that referenced this pull request Nov 10, 2022
Adds an optional third argument to `defineEventHandler()` to specify
an event name that is separate from the name used for the property.
This will be used, for instance, by the quic implementation to support
generating the `on...` events where the event name itself is hyphenated.
For instance `defineEventHandler(target, 'streamreset', 'stream-reset')`

Separated out from #44325

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #45032
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@danielleadams
Copy link
Contributor

@jasnell this didn't land cleanly on v18.x. Do you mind backporting this? Thank you.

@danielleadams danielleadams added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants