mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Uses rAF to interrupt the operator list execution
This commit is contained in:
parent
abc924b5af
commit
c5eb058b09
4 changed files with 28 additions and 18 deletions
|
@ -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);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue