aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/popup-proxy.js')
-rw-r--r--ext/fg/js/popup-proxy.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index 28f6b276..f1b3ab21 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -20,12 +20,11 @@
*/
class PopupProxy extends EventDispatcher {
- constructor(id, depth, parentPopupId, parentFrameId, ownerFrameId, frameOffsetForwarder=null) {
+ constructor(id, depth, frameId, ownerFrameId, frameOffsetForwarder=null) {
super();
this._id = id;
this._depth = depth;
- this._parentPopupId = parentPopupId;
- this._parentFrameId = parentFrameId;
+ this._frameId = frameId;
this._ownerFrameId = ownerFrameId;
this._frameOffsetForwarder = frameOffsetForwarder;
@@ -69,13 +68,12 @@ class PopupProxy extends EventDispatcher {
return null;
}
- // Public functions
-
- async prepare() {
- const {id} = await this._invoke('getOrCreatePopup', {id: this._id, parentId: this._parentPopupId, ownerFrameId: this._ownerFrameId});
- this._id = id;
+ get frameId() {
+ return this._frameId;
}
+ // Public functions
+
setOptionsContext(optionsContext, source) {
return this._invokeSafe('setOptionsContext', {id: this._id, optionsContext, source});
}
@@ -148,7 +146,7 @@ class PopupProxy extends EventDispatcher {
// Private
_invoke(action, params={}) {
- return api.crossFrame.invoke(this._parentFrameId, action, params);
+ return api.crossFrame.invoke(this._frameId, action, params);
}
async _invokeSafe(action, params={}, defaultReturnValue) {