You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this works, it could potentially lead to memory leaks, if a specific key is forgotten. E.g. if my module would have registered key('space', this.scope, cb).
Proposed Solution
A possibility to remove every event-handler for a given scope would be very helpful. Possible APIs:
If such a feature is desired, I would be willing to send a PR along with tests. This being said, I would love to get your input on this beforehand. Do you consider the use-case good enough to add this functionality to keymaster? And if yes, what would the ideal API for this be?
The text was updated successfully, but these errors were encountered:
Feature Request: Unbind Scope
Motivaiton
I often find myself writing the following code:
While this works, it could potentially lead to memory leaks, if a specific key is forgotten. E.g. if my module would have registered
key('space', this.scope, cb)
.Proposed Solution
A possibility to remove every event-handler for a given scope would be very helpful. Possible APIs:
Discussion
If such a feature is desired, I would be willing to send a PR along with tests. This being said, I would love to get your input on this beforehand. Do you consider the use-case good enough to add this functionality to
keymaster
? And if yes, what would the ideal API for this be?The text was updated successfully, but these errors were encountered: