Skip to content

Commit

Permalink
fix(utils-dom): bind requestAF to WINDOW (bootstrap-vue#6508)
Browse files Browse the repository at this point in the history
  • Loading branch information
xenolithviktor committed Mar 19, 2021
1 parent 1d59417 commit cb8b8bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export const closestEl =
// `requestAnimationFrame()` convenience method
/* istanbul ignore next: JSDOM always returns the first option */
export const requestAF =
WINDOW.requestAnimationFrame ||
WINDOW.webkitRequestAnimationFrame ||
WINDOW.mozRequestAnimationFrame ||
WINDOW.msRequestAnimationFrame ||
WINDOW.oRequestAnimationFrame ||
(WINDOW.requestAnimationFrame && WINDOW.requestAnimationFrame.bind(WINDOW)) ||
(WINDOW.webkitRequestAnimationFrame && WINDOW.webkitRequestAnimationFrame.bind(WINDOW)) ||
(WINDOW.mozRequestAnimationFrame && WINDOW.mozRequestAnimationFrame.bind(WINDOW)) ||
(WINDOW.msRequestAnimationFrame && WINDOW.msRequestAnimationFrame.bind(WINDOW)) ||
(WINDOW.oRequestAnimationFrame && WINDOW.oRequestAnimationFrame.bind(WINDOW)) ||
// Fallback, but not a true polyfill
// Only needed for Opera Mini
/* istanbul ignore next */
Expand Down

0 comments on commit cb8b8bd

Please sign in to comment.