🌐 AI搜索 & 代理 主页
Skip to content

Commit cb8b8bd

Browse files
fix(utils-dom): bind requestAF to WINDOW (bootstrap-vue#6508)
1 parent 1d59417 commit cb8b8bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/utils/dom.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ export const closestEl =
4747
// `requestAnimationFrame()` convenience method
4848
/* istanbul ignore next: JSDOM always returns the first option */
4949
export const requestAF =
50-
WINDOW.requestAnimationFrame ||
51-
WINDOW.webkitRequestAnimationFrame ||
52-
WINDOW.mozRequestAnimationFrame ||
53-
WINDOW.msRequestAnimationFrame ||
54-
WINDOW.oRequestAnimationFrame ||
50+
(WINDOW.requestAnimationFrame && WINDOW.requestAnimationFrame.bind(WINDOW)) ||
51+
(WINDOW.webkitRequestAnimationFrame && WINDOW.webkitRequestAnimationFrame.bind(WINDOW)) ||
52+
(WINDOW.mozRequestAnimationFrame && WINDOW.mozRequestAnimationFrame.bind(WINDOW)) ||
53+
(WINDOW.msRequestAnimationFrame && WINDOW.msRequestAnimationFrame.bind(WINDOW)) ||
54+
(WINDOW.oRequestAnimationFrame && WINDOW.oRequestAnimationFrame.bind(WINDOW)) ||
5555
// Fallback, but not a true polyfill
5656
// Only needed for Opera Mini
5757
/* istanbul ignore next */

0 commit comments

Comments
 (0)