aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-factory.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/popup-factory.js')
-rw-r--r--ext/fg/js/popup-factory.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/fg/js/popup-factory.js b/ext/fg/js/popup-factory.js
index b10acbaf..b5997253 100644
--- a/ext/fg/js/popup-factory.js
+++ b/ext/fg/js/popup-factory.js
@@ -16,8 +16,8 @@
*/
/* global
- * FrontendApiReceiver
* Popup
+ * api
*/
class PopupFactory {
@@ -29,7 +29,7 @@ class PopupFactory {
// Public functions
async prepare() {
- const apiReceiver = new FrontendApiReceiver(`popup-factory#${this._frameId}`, new Map([
+ api.crossFrame.registerHandlers([
['getOrCreatePopup', {async: false, handler: this._onApiGetOrCreatePopup.bind(this)}],
['setOptionsContext', {async: true, handler: this._onApiSetOptionsContext.bind(this)}],
['hide', {async: false, handler: this._onApiHide.bind(this)}],
@@ -41,8 +41,7 @@ class PopupFactory {
['clearAutoPlayTimer', {async: false, handler: this._onApiClearAutoPlayTimer.bind(this)}],
['setContentScale', {async: false, handler: this._onApiSetContentScale.bind(this)}],
['getUrl', {async: false, handler: this._onApiGetUrl.bind(this)}]
- ]));
- apiReceiver.prepare();
+ ]);
}
getOrCreatePopup(id=null, parentId=null, depth=null) {