diff options
Diffstat (limited to 'ext/bg/js/settings/popup-preview-frame-main.js')
-rw-r--r-- | ext/bg/js/settings/popup-preview-frame-main.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame-main.js b/ext/bg/js/settings/popup-preview-frame-main.js index 7c4e2eb9..4c6096ec 100644 --- a/ext/bg/js/settings/popup-preview-frame-main.js +++ b/ext/bg/js/settings/popup-preview-frame-main.js @@ -16,12 +16,23 @@ */ /* global + * PopupFactory * PopupPreviewFrame * api */ (async () => { - api.forwardLogsToBackend(); - const preview = new PopupPreviewFrame(); - await preview.prepare(); + try { + api.forwardLogsToBackend(); + + const {frameId} = await api.frameInformationGet(); + + const popupFactory = new PopupFactory(frameId); + await popupFactory.prepare(); + + const preview = new PopupPreviewFrame(frameId, popupFactory); + await preview.prepare(); + } catch (e) { + yomichan.logError(e); + } })(); |