1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import defined from "./defined.js";
- var implementation;
- if (typeof cancelAnimationFrame !== "undefined") {
- implementation = cancelAnimationFrame;
- }
- (function () {
-
- if (!defined(implementation) && typeof window !== "undefined") {
- var vendors = ["webkit", "moz", "ms", "o"];
- var i = 0;
- var len = vendors.length;
- while (i < len && !defined(implementation)) {
- implementation = window[vendors[i] + "CancelAnimationFrame"];
- if (!defined(implementation)) {
- implementation = window[vendors[i] + "CancelRequestAnimationFrame"];
- }
- ++i;
- }
- }
-
- if (!defined(implementation)) {
- implementation = clearTimeout;
- }
- })();
- function cancelAnimationFramePolyfill(requestID) {
-
-
-
- implementation(requestID);
- }
- export default cancelAnimationFramePolyfill;
|