summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-03-22 03:29:09 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-05 19:57:37 +0300
commit9fe1e38afb056164dbcc4369160bb9fd4790a2c0 (patch)
treeb7770f33bd2b0d883e4ae6737c5bf8fcc5011c7c /ext/fg/js/popup-proxy.js
parentd20ece9f074bb9d241a902f29344e5906e3c8210 (diff)
refactor
Diffstat (limited to 'ext/fg/js/popup-proxy.js')
-rw-r--r--ext/fg/js/popup-proxy.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index 73148eee..a25f9183 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -21,7 +21,7 @@
*/
class PopupProxy {
- constructor(id, depth, parentId, parentFrameId, url, applyFrameOffset=async (x, y) => [x, y]) {
+ constructor(id, depth, parentId, parentFrameId, url, applyFrameOffset=null) {
this._parentId = parentId;
this._parentFrameId = parentFrameId;
this._id = id;
@@ -81,7 +81,7 @@ class PopupProxy {
}
async containsPoint(x, y) {
- if (this._depth === 0) {
+ if (this._applyFrameOffset !== null) {
[x, y] = await this._applyFrameOffset(x, y);
}
return await this._invokeHostApi('containsPoint', {id: this._id, x, y});
@@ -89,7 +89,7 @@ class PopupProxy {
async showContent(elementRect, writingMode, type=null, details=null) {
let {x, y, width, height} = elementRect;
- if (this._depth === 0) {
+ if (this._applyFrameOffset !== null) {
[x, y] = await this._applyFrameOffset(x, y);
}
elementRect = {x, y, width, height};