-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(esl-utils): getEventListeners() method for SynteticEventTarget #1548
Conversation
Hey, @exadel-inc/esl-all-contributors team the is a small stylistic question appears in this PR, so we need your feedback to decide the final way for our update. Option 1 (👍🏻)
At the same time, we do not use
But potentially, we share overoptimized getEventListeners with the user. Option 2 (🎉)
The collections (arrays) in the private store Then we can safely use it in dispatchEvent
But again, potentially, the key As additional options, we can also consider Option 4 (🚀) use a Set to store listeners (but according to the specific of the event target, the only frequent operation is getting listeners for a defined event type, so there is may no need to use mo strict collection) Please share your opinion with marked emoji or in the tread (here or Slack) |
According to the votes, let's go with the following update for the
|
src/modules/esl-event-listener/core/targets/decorated.target.ts
Outdated
Show resolved
Hide resolved
Code Climate has analyzed commit b2b061d and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 48.4% (0.0% change). View more on Code Climate. |
🎉 This PR is included in version 4.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Protected method to get event listeners for SynteticEventTarget
Closes: #1540