We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
requestAF()
window
1 parent 340908c commit f8caaecCopy full SHA for f8caaec
src/utils/dom.js
@@ -46,7 +46,7 @@ export const closestEl =
46
47
// `requestAnimationFrame()` convenience method
48
/* istanbul ignore next: JSDOM always returns the first option */
49
-export const requestAF =
+export const requestAF = (
50
WINDOW.requestAnimationFrame ||
51
WINDOW.webkitRequestAnimationFrame ||
52
WINDOW.mozRequestAnimationFrame ||
@@ -56,6 +56,7 @@ export const requestAF =
56
// Only needed for Opera Mini
57
/* istanbul ignore next */
58
(cb => setTimeout(cb, 16))
59
+).bind(WINDOW)
60
61
export const MutationObs =
62
WINDOW.MutationObserver || WINDOW.WebKitMutationObserver || WINDOW.MozMutationObserver || null
0 commit comments