summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/audio-ui.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-26 21:01:40 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-26 21:01:40 -0500
commit8bc1a409144898124386ef03e921efb2a6e73a8f (patch)
treea0051c7621cd5e1efe392538b632cd376fd98c78 /ext/bg/js/settings/audio-ui.js
parentfc08cd74fe030ced6840a51ebe093f924cdd87e0 (diff)
Use .bind instead of () => {}
Diffstat (limited to 'ext/bg/js/settings/audio-ui.js')
-rw-r--r--ext/bg/js/settings/audio-ui.js6
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);