Today I learned
In general, a good practice is to avoid anonymous functions for the listener else it is not possible to remove the event later.
In general, a good practice is to avoid anonymous functions for the listener else it is not possible to remove the event later.
['click', 'focus', 'blur'].forEach(type => elm.removeEventListener(type, this));