mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
Fixed #99 with requestAnimationFrame polyfill
This commit is contained in:
16
js/utils/poly.js
Normal file
16
js/utils/poly.js
Normal file
@ -0,0 +1,16 @@
|
||||
(function(ionic) {
|
||||
'use strict';
|
||||
|
||||
// From the man himself, Mr. Paul Irish.
|
||||
// The requestAnimationFrame polyfill
|
||||
window.rAF = (function(){
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
function( callback ){
|
||||
window.setTimeout(callback, 1000 / 60);
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
})(window.ionic);
|
||||
Reference in New Issue
Block a user