summaryrefslogtreecommitdiff
path: root/ext/mixed
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/mixed
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/mixed')
-rw-r--r--ext/mixed/js/display.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 08ececc7..1cc08bc7 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -348,7 +348,7 @@ class Display extends EventDispatcher {
}
}
- async setupNestedPopups(frontendInitializationData) {
+ async setupNestedPopups({depth, parentPopupId, parentFrameId, useProxyPopup}) {
await dynamicLoader.loadScripts([
'/mixed/js/text-scanner.js',
'/mixed/js/frame-client.js',
@@ -364,7 +364,16 @@ class Display extends EventDispatcher {
const popupFactory = new PopupFactory(frameId);
popupFactory.prepare();
- const frontend = new Frontend(frameId, popupFactory, frontendInitializationData);
+ const frontend = new Frontend({
+ frameId,
+ popupFactory,
+ depth,
+ parentPopupId,
+ parentFrameId,
+ useProxyPopup,
+ isSearchPage: false,
+ allowRootFramePopupProxy: true
+ });
await frontend.prepare();
}