aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/popup-preview-frame.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/popup-preview-frame.js
parentfc08cd74fe030ced6840a51ebe093f924cdd87e0 (diff)
Use .bind instead of () => {}
Diffstat (limited to 'ext/bg/js/settings/popup-preview-frame.js')
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index d0336b5e..4c086bcd 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -44,7 +44,7 @@ class SettingsPopupPreview {
async prepare() {
// Setup events
- window.addEventListener('message', (e) => this.onMessage(e), false);
+ window.addEventListener('message', this.onMessage.bind(this), false);
const themeDarkCheckbox = document.querySelector('#theme-dark-checkbox');
if (themeDarkCheckbox !== null) {
@@ -52,7 +52,7 @@ class SettingsPopupPreview {
}
// Overwrite API functions
- window.apiOptionsGet = (...args) => this.apiOptionsGet(...args);
+ window.apiOptionsGet = this.apiOptionsGet.bind(this);
// Overwrite frontend
const popupHost = new PopupProxyHost();
@@ -62,7 +62,7 @@ class SettingsPopupPreview {
this.popup.setChildrenSupported(false);
this.popupSetCustomOuterCssOld = this.popup.setCustomOuterCss;
- this.popup.setCustomOuterCss = (...args) => this.popupSetCustomOuterCss(...args);
+ this.popup.setCustomOuterCss = this.popupSetCustomOuterCss.bind(this);
this.frontend = new Frontend(this.popup);