diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-15 22:21:01 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-16 19:54:41 -0500 |
commit | 68a0293867423898181b0452d842a818ce77824a (patch) | |
tree | e1725f830a219e714a49e17a155eba457186babc /ext/fg/js/popup-proxy.js | |
parent | d6c64643b1f734905c50e599b3cf95f92c25175a (diff) |
Make PopupProxy functions async enabled status match Popup
Diffstat (limited to 'ext/fg/js/popup-proxy.js')
-rw-r--r-- | ext/fg/js/popup-proxy.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js index e4081e90..0e6a88a7 100644 --- a/ext/fg/js/popup-proxy.js +++ b/ext/fg/js/popup-proxy.js @@ -53,11 +53,11 @@ class PopupProxy { return await this._invokeHostApi('setOptions', {id, options}); } - async hide(changeFocus) { + hide(changeFocus) { if (this._id === null) { return; } - return await this._invokeHostApi('hide', {id: this._id, changeFocus}); + this._invokeHostApi('hide', {id: this._id, changeFocus}); } async isVisible() { @@ -65,9 +65,11 @@ class PopupProxy { return await this._invokeHostApi('isVisible', {id}); } - async setVisibleOverride(visible) { - const id = await this._getPopupId(); - return await this._invokeHostApi('setVisibleOverride', {id, visible}); + setVisibleOverride(visible) { + if (this._id === null) { + return; + } + this._invokeHostApi('setVisibleOverride', {id, visible}); } async containsPoint(x, y) { @@ -88,11 +90,11 @@ class PopupProxy { return await this._invokeHostApi('setCustomCss', {id, css}); } - async clearAutoPlayTimer() { + clearAutoPlayTimer() { if (this._id === null) { return; } - return await this._invokeHostApi('clearAutoPlayTimer', {id: this._id}); + this._invokeHostApi('clearAutoPlayTimer', {id: this._id}); } // Private |