From c26c4ae0cb2e8516d79e827e7f76a5974fffdae4 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 16 Aug 2020 16:16:18 -0400 Subject: Frontend initialization refactor (#737) * Fix incorrect popup depth reassignment * Rename variable * Rename property * Use explicit parameter values * Refactor setupNestedPopups * Refactor frontend initialization --- ext/bg/js/settings/popup-preview-frame.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'ext/bg/js/settings') diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js index 98630503..eb174917 100644 --- a/ext/bg/js/settings/popup-preview-frame.js +++ b/ext/bg/js/settings/popup-preview-frame.js @@ -55,13 +55,16 @@ class PopupPreviewFrame { api.optionsGet = this._apiOptionsGet.bind(this); // Overwrite frontend - this._frontend = new Frontend( - this._frameId, - this._popupFactory, - { - allowRootFramePopupProxy: false - } - ); + this._frontend = new Frontend({ + frameId: this._frameId, + popupFactory: this._popupFactory, + depth: 0, + parentPopupId: null, + parentFrameId: null, + useProxyPopup: false, + isSearchPage: false, + allowRootFramePopupProxy: false + }); this._frontendGetOptionsContextOld = this._frontend.getOptionsContext.bind(this._frontend); this._frontend.getOptionsContext = this._getOptionsContext.bind(this); await this._frontend.prepare(); -- cgit v1.2.3