Skip to content

Commit

Permalink
Disable use of requestIdleCallback in util/misc. Revert back to using…
Browse files Browse the repository at this point in the history
… setTimeout so the delays are guaranteed.
  • Loading branch information
edhager committed Jun 30, 2017
1 parent 6d75b0d commit ee10d7c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions util/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ define([
// setTimeout executes its callback when delay has transpired, *or later*
// requestIdleCallback executes its callback when delay has transpired, *or sooner*
// Fixes https://github.com/SitePen/dgrid/issues/1351
if (has('requestidlecallback')) {
delayCallback = function (callback, delay) {
return requestIdleCallback(callback, { timeout: delay });
};
cancelDelay = cancelIdleCallback;
}
// if (has('requestidlecallback')) {
// delayCallback = function (callback, delay) {
// return requestIdleCallback(callback, { timeout: delay });
// };
// cancelDelay = cancelIdleCallback;
// }

function removeRule(index) {
// Function called by the remove method on objects returned by addCssRule.
Expand Down

0 comments on commit ee10d7c

Please sign in to comment.