Correctly detect if requestAnimationFrame is supported in compatibility.js (issue 8272)

This is a regression from PR 8222.

Fixes 8272.
This commit is contained in:
Jonas Jenwald 2017-04-11 16:58:22 +02:00
parent 10e5f766a2
commit 3a302fdb53

View File

@ -663,12 +663,12 @@ PDFJS.compatibilityChecked = true;
if ('requestAnimationFrame' in window) {
return;
}
window.requestAnimationFrame =
window.mozRequestAnimationFrame ||
window.requestAnimationFrame = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame;
if (!('requestAnimationFrame' in window)) {
installFakeAnimationFrameFunctions();
if (window.requestAnimationFrame) {
return;
}
installFakeAnimationFrameFunctions();
})();
// Support: Android, iOS