mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
Paranoid requestAnimationFrame for antique Firefox
Very old versions of Firefox - e.g. Firefox 7 - have window.requestAnimationFrame but not cancelAnimationFrame. This is a very old release so the easiest fix is simply to check for both of the functions which we intend to call and fall back on traditional behaviour if both aren't present.
This commit is contained in:
parent
673f881d52
commit
568d6a1c6b
@ -1662,7 +1662,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
||||
|
||||
|
||||
// polyfill, when necessary
|
||||
if ( w.requestAnimationFrame ) {
|
||||
if ( w.requestAnimationFrame && w.cancelAnimationFrame ) {
|
||||
//we cant assign window.requestAnimationFrame directly to $.requestAnimationFrame
|
||||
//without getting Illegal Invocation errors in webkit so call in a
|
||||
//wrapper
|
||||
|
Loading…
Reference in New Issue
Block a user