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/mixed/js/display.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ext/mixed') 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(); } -- cgit v1.2.3