summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-23 15:18:41 -0400
committerGitHub <noreply@github.com>2020-08-23 15:18:41 -0400
commit773e28aa3c23c1cb93d5b19b10c49fcec19487a9 (patch)
treefcf3c775c3f97d1852848253149a47b55fa0a753 /ext/fg/js/popup-proxy.js
parent934355dd09aa8b7e8993759b678af063b56b9fc6 (diff)
Fix screenshot popup hide (#753)
* Refactor Popup.setVisibleOverride * Use event to observe visibility changes * Add setAllVisibleOverride/clearAllVisibleOverride * Add setAllVisibleOverride/clearAllVisibleOverride cross frame handlers * Update how visibility is changed * Wait for next frame to ensure visibility has been updated
Diffstat (limited to 'ext/fg/js/popup-proxy.js')
-rw-r--r--ext/fg/js/popup-proxy.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index f1b3ab21..efbc72a6 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -86,8 +86,12 @@ class PopupProxy extends EventDispatcher {
return this._invokeSafe('isVisible', {id: this._id}, false);
}
- setVisibleOverride(visible) {
- return this._invokeSafe('setVisibleOverride', {id: this._id, visible});
+ async setVisibleOverride(value, priority) {
+ return this._invokeSafe('setVisibleOverride', {id: this._id, value, priority});
+ }
+
+ async clearVisibleOverride(token) {
+ return this._invokeSafe('clearVisibleOverride', {id: this._id, token});
}
async containsPoint(x, y) {