UNPKG

@momentum-ui/react

Version:

Cisco Momentum UI framework for ReactJs applications

19 lines (16 loc) 760 B
// Properly handle server-side rendering. var win; if (typeof window !== 'undefined') { win = window; } else if (typeof self !== 'undefined') { win = self; } else { win = {}; } // requestAnimationFrame() shim by Paul Irish // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ export var raf = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback) { return win.setTimeout(callback, 1000 / 60); }; export var caf = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id) { win.clearTimeout(id); };