this.button_right.addEventListener('click', this.play_right.bind(this));
this['button_' + name].removeEventListener('click', this['play_' + name]);
this['button_style_' + name].style.stroke = 'lightgrey';
this[name] = 0;
class SomeModule {
constructor() {
this.handlerShim = (e) => {
this.handler(e);
};
}
method1() {
document.addEventListener('click', this.handlerShim);
}
method2() {
document.removeEventListener('click', this.handlerShim);
}
handler(e) {
console.log(e);
}
}