diff options
Diffstat (limited to 'ext/fg/js')
-rw-r--r-- | ext/fg/js/frontend.js | 2 | ||||
-rw-r--r-- | ext/fg/js/popup-proxy-host.js | 2 | ||||
-rw-r--r-- | ext/fg/js/popup-proxy.js | 10 | ||||
-rw-r--r-- | ext/fg/js/popup.js | 2 |
4 files changed, 4 insertions, 12 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index f59ea318..1dff6fb9 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -294,7 +294,7 @@ class Frontend { async searchAt(point, type) { if ( this.pendingLookup || - (this.popup.containsPointIsAsync() ? await this.popup.containsPointAsync(point) : this.popup.containsPoint(point)) + await this.popup.containsPoint(point) ) { return; } diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js index cdd1d02c..1048f410 100644 --- a/ext/fg/js/popup-proxy-host.js +++ b/ext/fg/js/popup-proxy-host.js @@ -110,7 +110,7 @@ class PopupProxyHost { async containsPoint(id, point) { const popup = this.getPopup(id); - return popup.containsPointIsAsync() ? await popup.containsPointAsync(point) : popup.containsPoint(point); + return await popup.containsPoint(point); } async termsShow(id, elementRect, definitions, options, context) { diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js index bbf6a2cf..112b998e 100644 --- a/ext/fg/js/popup-proxy.js +++ b/ext/fg/js/popup-proxy.js @@ -69,21 +69,13 @@ class PopupProxy { return await this.invokeHostApi('setVisible', {id, visible}); } - containsPoint() { - throw 'Non-async function not supported'; - } - - async containsPointAsync(point) { + async containsPoint(point) { if (this.id === null) { return false; } return await this.invokeHostApi('containsPoint', {id: this.id, point}); } - containsPointIsAsync() { - return true; - } - async termsShow(elementRect, definitions, options, context) { const id = await this.getPopupId(); elementRect = PopupProxy.DOMRectToJson(elementRect); diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index ab1dbbed..6b757472 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -248,7 +248,7 @@ class Popup { } } - containsPoint(point) { + async containsPoint(point) { if (!this.isVisible()) { return false; } |