aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-16 16:16:18 -0400
committerGitHub <noreply@github.com>2020-08-16 16:16:18 -0400
commitc26c4ae0cb2e8516d79e827e7f76a5974fffdae4 (patch)
treef4762afe8ac9d5ffc7ada531d8b788274d683ab7 /ext/bg
parent90d694429029d804740d2af384ad903be48b040e (diff)
Frontend initialization refactor (#737)
* Fix incorrect popup depth reassignment * Rename variable * Rename property * Use explicit parameter values * Refactor setupNestedPopups * Refactor frontend initialization
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/search.js2
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js17
2 files changed, 11 insertions, 8 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 0a0699a9..2aa6d249 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -330,7 +330,7 @@ class DisplaySearch extends Display {
try {
await this.setupNestedPopups({
depth: 1,
- proxy: false,
+ useProxyPopup: false,
isSearchPage: true
});
} catch (e) {
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();