summaryrefslogtreecommitdiff
path: root/ext/bg/js/search.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/search.js
parentfc08cd74fe030ced6840a51ebe093f924cdd87e0 (diff)
Use .bind instead of () => {}
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r--ext/bg/js/search.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index c692a859..e9b1918b 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -93,18 +93,18 @@ class DisplaySearch extends Display {
} else {
this.clipboardMonitorEnable.checked = false;
}
- this.clipboardMonitorEnable.addEventListener('change', (e) => this.onClipboardMonitorEnableChange(e));
+ this.clipboardMonitorEnable.addEventListener('change', this.onClipboardMonitorEnableChange.bind(this));
}
chrome.runtime.onMessage.addListener(this.onRuntimeMessage.bind(this));
- this.search.addEventListener('click', (e) => this.onSearch(e), false);
- this.query.addEventListener('input', () => this.onSearchInput(), false);
- this.wanakanaEnable.addEventListener('change', (e) => this.onWanakanaEnableChange(e));
- window.addEventListener('popstate', (e) => this.onPopState(e));
- window.addEventListener('copy', (e) => this.onCopy(e));
+ this.search.addEventListener('click', this.onSearch.bind(this), false);
+ this.query.addEventListener('input', this.onSearchInput.bind(this), false);
+ this.wanakanaEnable.addEventListener('change', this.onWanakanaEnableChange.bind(this));
+ window.addEventListener('popstate', this.onPopState.bind(this));
+ window.addEventListener('copy', this.onCopy.bind(this));
- this.clipboardMonitor.onClipboardText = (text) => this.onExternalSearchUpdate(text);
+ this.clipboardMonitor.onClipboardText = this.onExternalSearchUpdate.bind(this);
this.updateSearchButton();
} catch (e) {