summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-14 14:27:25 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-14 14:27:25 -0400
commit6d3037f3d6548b742fa73aec7504c4384f327674 (patch)
tree425698af2775a224d56e0ed9187d6f3cfaa4e663 /ext/fg/js/frontend.js
parent89941d404cdae213ad6c609051de3d206f433beb (diff)
Remove destructuring from searchAt, containsPoint, docRangeFromPoint
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 9341e492..a6919b37 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -104,7 +104,7 @@ class Frontend {
const search = async () => {
try {
- await this.searchAt({x: e.clientX, y: e.clientY}, 'mouse');
+ await this.searchAt(e.clientX, e.clientY, 'mouse');
} catch (e) {
this.onError(e);
}
@@ -280,12 +280,12 @@ class Frontend {
}
}
- async searchAt(point, type) {
- if (this.pendingLookup || await this.popup.containsPoint(point)) {
+ async searchAt(x, y, type) {
+ if (this.pendingLookup || await this.popup.containsPoint(x, y)) {
return;
}
- const textSource = docRangeFromPoint(point, this.options);
+ const textSource = docRangeFromPoint(x, y, this.options);
let hideResults = textSource === null;
let searched = false;
let success = false;
@@ -470,7 +470,7 @@ class Frontend {
const search = async () => {
try {
- await this.searchAt({x, y}, type);
+ await this.searchAt(x, y, type);
} catch (e) {
this.onError(e);
}