diff options
| -rw-r--r-- | eslint.config.js | 3 | ||||
| -rwxr-xr-x | js/common.js | 4 |
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); } }()); }; |