From 7ae05840772c04f1263f851432e21bd5a313b320 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 21 Dec 2019 13:19:31 -0500 Subject: Update initialization --- ext/bg/js/settings/popup-preview-frame.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ext/bg/js/settings/popup-preview-frame.js') diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js index cabadced..53077a83 100644 --- a/ext/bg/js/settings/popup-preview-frame.js +++ b/ext/bg/js/settings/popup-preview-frame.js @@ -47,14 +47,15 @@ class SettingsPopupPreview { window.apiOptionsGet = (...args) => this.apiOptionsGet(...args); // Overwrite frontend - this.frontend = Frontend.create(); + const popup = PopupProxyHost.instance.createPopup(null, 0); + popup.setChildrenSupported(false); + + this.frontend = new Frontend(popup); this.frontend.setEnabled = function () {}; this.frontend.searchClear = function () {}; - this.frontend.popup.setChildrenSupported(false); - - await this.frontend.isPrepared(); + await this.frontend.prepare(); // Overwrite popup Popup.injectOuterStylesheet = (...args) => this.popupInjectOuterStylesheet(...args); -- cgit v1.2.3