diff --git a/src/utils.js b/src/utils.js index 4570ce8..6e76ad4 100644 --- a/src/utils.js +++ b/src/utils.js @@ -20,6 +20,13 @@ return siblings[index + 1]; }; + // Safari doesn't have this! + window.requestIdleCallback = + window.requestIdleCallback || + function(fn) { + setTimeout(fn, 10); + }; + /* * @param Selector that should match for next siblings * @return element Next element that mathes `selector`