aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-initialize.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-21 13:27:32 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-21 13:27:32 -0500
commita2175f2c293ef2de41a58acdd9adc202b0302d67 (patch)
treef3bf7d760a80402b00dd4debdf2af7ac9ece8254 /ext/fg/js/frontend-initialize.js
parent7ae05840772c04f1263f851432e21bd5a313b320 (diff)
Move PopupProxyHost initialization
Diffstat (limited to 'ext/fg/js/frontend-initialize.js')
-rw-r--r--ext/fg/js/frontend-initialize.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index 4fef3a2e..c153b5b6 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -21,7 +21,13 @@ async function main() {
const data = window.frontendInitializationData || {};
const {id, depth=0, parentFrameId, ignoreNodes, url, proxy=false} = data;
- const popup = proxy ? new PopupProxy(depth + 1, id, parentFrameId, url) : PopupProxyHost.instance.createPopup(null, depth);
+ let popupHost = null;
+ if (!proxy) {
+ popupHost = new PopupProxyHost();
+ await popupHost.prepare();
+ }
+
+ const popup = proxy ? new PopupProxy(depth + 1, id, parentFrameId, url) : popupHost.createPopup(null, depth);
const frontend = new Frontend(popup, ignoreNodes);
await frontend.prepare();
}