aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-08 19:50:13 -0400
committerGitHub <noreply@github.com>2020-07-08 19:50:13 -0400
commit295ffa6e54d04cedef35a4798cabdae71f824ee1 (patch)
tree8dc2e9dff44f63d1c0f4011094b6a104d35e4185 /ext/fg/js/popup.js
parent128588bb92142950b53ed3f51774c13b35a82fae (diff)
Refactor DisplayFloat=>Frontend message passing (#652)
* Change getOrCreatePopup arguments to be an object * Add ownerFrameId to popup and DisplayFloat * Refactor DisplayFloat host action invocation * Use CrossFrameAPI instead of window.postMessage * Update popup closing functionality on the search page
Diffstat (limited to 'ext/fg/js/popup.js')
-rw-r--r--ext/fg/js/popup.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index f9305bcd..a856d773 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -22,10 +22,11 @@
*/
class Popup {
- constructor(id, depth, frameId) {
+ constructor(id, depth, frameId, ownerFrameId) {
this._id = id;
this._depth = depth;
this._frameId = frameId;
+ this._ownerFrameId = ownerFrameId;
this._parent = null;
this._child = null;
this._childrenSupported = true;
@@ -382,6 +383,7 @@ class Popup {
this._invokeApi('configure', {
messageId,
frameId: this._frameId,
+ ownerFrameId: this._ownerFrameId,
popupId: this._id,
optionsContext: this._optionsContext,
childrenSupported: this._childrenSupported,