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

events: support event handlers #33646

Closed
wants to merge 3 commits into from

Conversation

benjamingr
Copy link
Member

Adds a utility function to add support for EventTargets with event handlers. These are things like document.body.onclick where there is special behavior. See the note about inline handlers here for more info.

This PR adds a utility function defineEventHandler that defines an event handler.

cc @addaleax you asked about this :]
cc @Janell, you might want to use this for onabort rather than defining it ad-hoc.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@benjamingr benjamingr added the events Issues and PRs related to the events subsystem / EventEmitter. label May 29, 2020
@nodejs-github-bot
Copy link
Collaborator

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 30, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@jasnell jasnell added eventtarget Issues and PRs related to the EventTarget implementation. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Jun 19, 2020
Co-authored-by: James M Snell <jasnell@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

@jasnell
Copy link
Member

jasnell commented Jun 22, 2020

Closing in favor of #34015 (which combines this and other eventtarget PRs into a single to make landing easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
events Issues and PRs related to the events subsystem / EventEmitter. eventtarget Issues and PRs related to the EventTarget implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants