summaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
authorpraschke <stel@comfy.monster>2023-10-01 09:47:59 +0100
committerpraschke <stel@comfy.monster>2023-10-01 09:47:59 +0100
commit841d49c7f97678b4873ea198b91419687d137849 (patch)
tree412d74bdc1f688e768637bb11eddf27bdffdb7a1 /ext/js
parentbe46fb6faf8d9403a3b23e29e35cc2982a66732e (diff)
wait for backend ready signal to prepare cross-frame api
not sure if API messages should be sent in prepare(), but we should probably wait for the ready signal before doing so
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/yomichan.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/yomichan.js b/ext/js/yomichan.js
index e4fcd4bc..5a55b3ea 100644
--- a/ext/js/yomichan.js
+++ b/ext/js/yomichan.js
@@ -129,12 +129,12 @@ class Yomichan extends EventDispatcher {
if (!isBackground) {
this._api = new API(this);
- this._crossFrame = new CrossFrameAPI();
- this._crossFrame.prepare();
-
this.sendMessage({action: 'requestBackendReadySignal'});
await this._isBackendReadyPromise;
+ this._crossFrame = new CrossFrameAPI();
+ await this._crossFrame.prepare();
+
log.on('log', this._onForwardLog.bind(this));
}
}