summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-initialize.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend-initialize.js')
-rw-r--r--ext/fg/js/frontend-initialize.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index 777291fe..51fa8d7a 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -40,23 +40,26 @@ async function main() {
chrome.runtime.onMessage.removeListener(runtimeMessageCallback);
callback();
rootPopupInformationResolve(params);
- return false;
}
};
chrome.runtime.onMessage.addListener(runtimeMessageCallback);
- apiForward('rootPopupInformationGet');
+ apiForward('rootPopupRequestInformationBroadcast');
const {popupId, frameId} = await rootPopupInformationPromise;
- window._frameOffsetForwarder = new FrameOffsetForwarder();
- const applyFrameOffset = window._frameOffsetForwarder.applyOffset.bind(window._frameOffsetForwarder);
+ const frameOffsetForwarder = new FrameOffsetForwarder();
+ frameOffsetForwarder.start();
+ const applyFrameOffset = frameOffsetForwarder.applyOffset.bind(frameOffsetForwarder);
+
popup = new PopupProxy(popupId, 0, null, frameId, url, applyFrameOffset);
await popup.prepare();
} else if (proxy) {
popup = new PopupProxy(null, depth + 1, id, parentFrameId, url);
await popup.prepare();
} else {
- window._frameOffsetForwarder = new FrameOffsetForwarder();
+ const frameOffsetForwarder = new FrameOffsetForwarder();
+ frameOffsetForwarder.start();
+
const popupHost = new PopupProxyHost();
await popupHost.prepare();