Uses rAF to interrupt the operator list execution

This commit is contained in:
Yury Delendik 2014-05-09 07:00:47 -05:00
parent abc924b5af
commit c5eb058b09
4 changed files with 28 additions and 18 deletions

View file

@ -564,3 +564,15 @@ if (typeof PDFJS === 'undefined') {
console.log('Unable to create polyfill for localStorage');
}
})();
(function checkRequestAnimationFrame() {
if ('requestAnimationFrame' in window) {
return;
}
window.requestAnimationFrame =
window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||
window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
(function fakeRequestAnimationFrame(callback) {
window.setTimeout(callback, 20);
});
})();