diff options
Diffstat (limited to 'ext/fg/js/content-script-main.js')
-rw-r--r-- | ext/fg/js/content-script-main.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/fg/js/content-script-main.js b/ext/fg/js/content-script-main.js index cebda2d7..c31cde3f 100644 --- a/ext/fg/js/content-script-main.js +++ b/ext/fg/js/content-script-main.js @@ -49,9 +49,8 @@ async function createIframePopupProxy(frameOffsetForwarder, setDisabled) { api.broadcastTab('rootPopupRequestInformationBroadcast'); const {popupId, frameId: parentFrameId} = await rootPopupInformationPromise; - const getFrameOffset = frameOffsetForwarder.getOffset.bind(frameOffsetForwarder); - - const popup = new PopupProxy(popupId, 0, null, parentFrameId, getFrameOffset, setDisabled); + const popup = new PopupProxy(popupId, 0, null, parentFrameId, frameOffsetForwarder); + popup.on('offsetNotFound', setDisabled); await popup.prepare(); return popup; @@ -115,7 +114,7 @@ async function createPopupProxy(depth, id, parentFrameId) { if (!proxy && frameOffsetForwarder === null) { frameOffsetForwarder = new FrameOffsetForwarder(); - frameOffsetForwarder.start(); + frameOffsetForwarder.prepare(); } let popup; |