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/dictionaries.js | |
parent | fc08cd74fe030ced6840a51ebe093f924cdd87e0 (diff) |
Use .bind instead of () => {}
Diffstat (limited to 'ext/bg/js/settings/dictionaries.js')
-rw-r--r-- | ext/bg/js/settings/dictionaries.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js index 70a22a16..3ceb12fa 100644 --- a/ext/bg/js/settings/dictionaries.js +++ b/ext/bg/js/settings/dictionaries.js @@ -36,7 +36,7 @@ class SettingsDictionaryListUI { this.dictionaryEntries = []; this.extra = null; - document.querySelector('#dict-delete-confirm').addEventListener('click', (e) => this.onDictionaryConfirmDelete(e), false); + document.querySelector('#dict-delete-confirm').addEventListener('click', this.onDictionaryConfirmDelete.bind(this), false); } setOptionsDictionaries(optionsDictionaries) { @@ -198,10 +198,10 @@ class SettingsDictionaryEntryUI { this.applyValues(); - this.eventListeners.addEventListener(this.enabledCheckbox, 'change', (e) => this.onEnabledChanged(e), false); - this.eventListeners.addEventListener(this.allowSecondarySearchesCheckbox, 'change', (e) => this.onAllowSecondarySearchesChanged(e), false); - this.eventListeners.addEventListener(this.priorityInput, 'change', (e) => this.onPriorityChanged(e), false); - this.eventListeners.addEventListener(this.deleteButton, 'click', (e) => this.onDeleteButtonClicked(e), false); + this.eventListeners.addEventListener(this.enabledCheckbox, 'change', this.onEnabledChanged.bind(this), false); + this.eventListeners.addEventListener(this.allowSecondarySearchesCheckbox, 'change', this.onAllowSecondarySearchesChanged.bind(this), false); + this.eventListeners.addEventListener(this.priorityInput, 'change', this.onPriorityChanged.bind(this), false); + this.eventListeners.addEventListener(this.deleteButton, 'click', this.onDeleteButtonClicked.bind(this), false); } cleanup() { |