summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-12 22:32:55 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-12 22:32:55 +0000
commit47848d0198cb13a718fd507bed98b03b13846b15 (patch)
tree4afdb452834c160be323367805e9fe6c76239e42
parentcde120b3d730dfb56fa59759bb9a7369584f551c (diff)
Fix various ESLint 'no-undef' rule instances.
https://eslint.org/docs/latest/rules/no-undef
-rw-r--r--eslint.config.js3
-rwxr-xr-xjs/common.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/eslint.config.js b/eslint.config.js
index a42b6d0e3..9b54e36af 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -30,6 +30,9 @@ export default [
navigator: 'readonly',
Event: 'readonly',
CustomEvent: 'readonly',
+ Element: 'readonly',
+ IntersectionObserver: 'readonly',
+ MutationObserver: 'readonly',
// Dojo
dojo: 'readonly',
diff --git a/js/common.js b/js/common.js
index 3e8a66e5b..60b2f4c9c 100755
--- a/js/common.js
+++ b/js/common.js
@@ -98,7 +98,7 @@ Element.prototype.fadeOut = function() {
if ((self.style.opacity -= 0.1) < 0) {
self.style.display = "none";
} else {
- requestAnimationFrame(fade);
+ window.requestAnimationFrame(fade);
}
}());
};
@@ -112,7 +112,7 @@ Element.prototype.fadeIn = function(display = undefined){
let val = parseFloat(self.style.opacity);
if (!((val += 0.1) > 1)) {
self.style.opacity = val;
- requestAnimationFrame(fade);
+ window.requestAnimationFrame(fade);
}
}());
};