aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-03 11:58:52 -0400
committerGitHub <noreply@github.com>2020-07-03 11:58:52 -0400
commit562cfd74708c47c93f22d809c9d3064ab099bfce (patch)
treeb635908e08c533d57242306809cde008f8642c35 /ext/fg/js/popup-proxy.js
parentd776125eade1683cec6b9b500ae8d37af03e43af (diff)
Make PopupProxy._frameOffsetExpireTimeout non-static (#640)
Diffstat (limited to 'ext/fg/js/popup-proxy.js')
-rw-r--r--ext/fg/js/popup-proxy.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index a6602eae..3f4473c6 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -31,6 +31,7 @@ class PopupProxy extends EventDispatcher {
this._frameOffset = null;
this._frameOffsetPromise = null;
this._frameOffsetUpdatedAt = null;
+ this._frameOffsetExpireTimeout = 1000;
}
// Public properties
@@ -113,7 +114,7 @@ class PopupProxy extends EventDispatcher {
async _updateFrameOffset() {
const now = Date.now();
const firstRun = this._frameOffsetUpdatedAt === null;
- const expired = firstRun || this._frameOffsetUpdatedAt < now - PopupProxy._frameOffsetExpireTimeout;
+ const expired = firstRun || this._frameOffsetUpdatedAt < now - this._frameOffsetExpireTimeout;
if (this._frameOffsetPromise === null && !expired) { return; }
if (this._frameOffsetPromise !== null) {
@@ -151,5 +152,3 @@ class PopupProxy extends EventDispatcher {
return [x + offsetX, y + offsetY];
}
}
-
-PopupProxy._frameOffsetExpireTimeout = 1000;