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

Better Management of Node eventHandlers add/remove #4

Open
jhickman opened this issue Nov 12, 2021 · 1 comment
Open

Better Management of Node eventHandlers add/remove #4

jhickman opened this issue Nov 12, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jhickman
Copy link
Member

Currently, the ShortcutTrapper instance will add event handlers to the provided node in the constructor and never remove. It would be nice to coordinate the add/remove with the number of bindings. This way, if the ShortcutTrapper gets cleared, it should remove the handlers and not 'technically' be tied to that node anymore.

@jhickman jhickman self-assigned this Nov 12, 2021
@jhickman jhickman added the enhancement New feature or request label Nov 12, 2021
@jhickman
Copy link
Member Author

Thinking through this, the instance isn't holding a copy of the Node, and in order to add/remove the handlers based upon the size() of the bindings collection, then we would have to hold onto it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant