Skip to content

Commit 22aa66a

Browse files
authored
Merge pull request phaserjs#2873 from stoneman1/master
Some browsers use cancelAnimationFrame with prefix like this: msCance…
2 parents 1445281 + ed625c3 commit 22aa66a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

v2-community/src/utils/RequestAnimationFrame.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Phaser.RequestAnimationFrame = function(game, forceSetTimeOut) {
4242
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; x++)
4343
{
4444
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
45-
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'];
45+
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
4646
}
4747

4848
/**

0 commit comments

Comments
 (0)