diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-26 21:01:40 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-26 21:01:40 -0500 |
commit | 8bc1a409144898124386ef03e921efb2a6e73a8f (patch) | |
tree | a0051c7621cd5e1efe392538b632cd376fd98c78 /ext/bg/js/settings/audio-ui.js | |
parent | fc08cd74fe030ced6840a51ebe093f924cdd87e0 (diff) |
Use .bind instead of () => {}
Diffstat (limited to 'ext/bg/js/settings/audio-ui.js')
-rw-r--r-- | ext/bg/js/settings/audio-ui.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/settings/audio-ui.js b/ext/bg/js/settings/audio-ui.js index 555380b4..206539a4 100644 --- a/ext/bg/js/settings/audio-ui.js +++ b/ext/bg/js/settings/audio-ui.js @@ -37,7 +37,7 @@ AudioSourceUI.Container = class Container { this.children.push(new AudioSourceUI.AudioSource(this, audioSource, this.children.length)); } - this._clickListener = () => this.onAddAudioSource(); + this._clickListener = this.onAddAudioSource.bind(this); this.addButton.addEventListener('click', this._clickListener, false); } @@ -105,8 +105,8 @@ AudioSourceUI.AudioSource = class AudioSource { this.select.value = audioSource; - this._selectChangeListener = () => this.onSelectChanged(); - this._removeClickListener = () => this.onRemoveClicked(); + this._selectChangeListener = this.onSelectChanged.bind(this); + this._removeClickListener = this.onRemoveClicked.bind(this); this.select.addEventListener('change', this._selectChangeListener, false); this.removeButton.addEventListener('click', this._removeClickListener, false); |