aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/float.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-16 12:23:20 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-16 12:23:20 -0500
commitb5d32c73e657c882ba6f70b79d4a5e214684f563 (patch)
tree64e63413e8307a43ef65b318dec88a3a76e4cd3f /ext/fg/js/float.js
parent42f1c2463c8051d9cbbcacd43f06922c2f11ec71 (diff)
Simplify process to wait for iframe prepare completion
Diffstat (limited to 'ext/fg/js/float.js')
-rw-r--r--ext/fg/js/float.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 46d1314e..35a78d48 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -34,7 +34,7 @@ class DisplayFloat extends Display {
window.addEventListener('message', (e) => this.onMessage(e), false);
}
- async prepare(options, popupInfo, url, childrenSupported, scale) {
+ async prepare(options, popupInfo, url, childrenSupported, scale, uniqueId) {
await super.prepare(options);
const {id, depth, parentFrameId} = popupInfo;
@@ -47,7 +47,7 @@ class DisplayFloat extends Display {
this.setContentScale(scale);
- apiForward('popupSetDisplayInitialized');
+ apiForward('popupPrepareCompleted', {uniqueId});
}
onError(error) {
@@ -125,7 +125,7 @@ DisplayFloat._messageHandlers = new Map([
['setContent', (self, {type, details}) => self.setContent(type, details)],
['clearAutoPlayTimer', (self) => self.clearAutoPlayTimer()],
['setCustomCss', (self, {css}) => self.setCustomCss(css)],
- ['initialize', (self, {options, popupInfo, url, childrenSupported, scale}) => self.prepare(options, popupInfo, url, childrenSupported, scale)],
+ ['prepare', (self, {options, popupInfo, url, childrenSupported, scale, uniqueId}) => self.prepare(options, popupInfo, url, childrenSupported, scale, uniqueId)],
['setContentScale', (self, {scale}) => self.setContentScale(scale)]
]);