AlexDM0/keycharm

Are keybindings removed automatically if bound to element?

felixhayashi opened this issue · 2 comments

Hi Alex,

keycharm is great and very easy to use, thanks! Just wanted to ask whether keybindings are removed automatically if bound to an element (not the window)? I expect this to be the case but the docs mention a destructor...

-Felix

Woohoo my first issue :)

…and it is not a bug!! First issues on my repos are usually bugs :D

I am going to assume your question is if the listeners are automatically removed if the element is removed?

Yes, sorry forgot to say that.

I am using the addEventListener method of the DOM API and it depends on the browser.

I also had a look at the code and the way you do it, I do not think there is a need to call the destroy. I don't support below IE 10 anyways :D
-Felix