aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 25537e55..238ac52c 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -100,10 +100,10 @@ class Backend {
this.onOptionsUpdated('background');
if (isObject(chrome.commands) && isObject(chrome.commands.onCommand)) {
- chrome.commands.onCommand.addListener((command) => this._runCommand(command));
+ chrome.commands.onCommand.addListener(this._runCommand.bind(this));
}
if (isObject(chrome.tabs) && isObject(chrome.tabs.onZoomChange)) {
- chrome.tabs.onZoomChange.addListener((info) => this._onZoomChange(info));
+ chrome.tabs.onZoomChange.addListener(this._onZoomChange.bind(this));
}
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
@@ -116,7 +116,7 @@ class Backend {
this.isPreparedResolve = null;
this.isPreparedPromise = null;
- this.clipboardMonitor.onClipboardText = (text) => this._onClipboardText(text);
+ this.clipboardMonitor.onClipboardText = this._onClipboardText.bind(this);
}
onOptionsUpdated(source) {