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: patch override alias of on/addListener and off/removeListener #5

Closed
wants to merge 12 commits into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Sep 10, 2019

Automatically fix override alias of on/addListener and off/removeListener

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

Previously these used alias which caused surprising behaviour
when trying to override add/removeListener, e.g. Readable.

This resolves this by making add/remove actually call the
corresponding function through the prototype chain.
@ronag ronag force-pushed the fix-events2 branch 2 times, most recently from 9860eaa to 399a089 Compare September 10, 2019 21:04
@ronag
Copy link
Member Author

ronag commented Sep 10, 2019

Question, should this patch the prototype (fast) or the instance (slow)?

@ronag ronag closed this Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant