UNPKG

react-spy-scroll

Version:
23 lines (19 loc) 514 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function native() { if (window) { return window.requestAnimationFrame || window.webkitRequestAnimationFrame; } return undefined; } function polyfill() { return function (callback, element, delay) { setTimeout(callback, delay || 1000 / 60, new Date().getTime()); }; } function createRequestAnimationFrame() { return native() || polyfill(); } exports.default = createRequestAnimationFrame();