From 9c7514abd2857f1a502109005d9dffe73cd4e5e5 Mon Sep 17 00:00:00 2001 From: arcadeJHS Date: Tue, 12 Feb 2013 19:28:05 +0100 Subject: [PATCH] Update HTML5-Space-Invaders.html fix --- HTML5-Space-Invaders.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/HTML5-Space-Invaders.html b/HTML5-Space-Invaders.html index 246884b..859fc51 100644 --- a/HTML5-Space-Invaders.html +++ b/HTML5-Space-Invaders.html @@ -322,14 +322,14 @@ (function() { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; - for(var x = 0; x < vendors.length && !window.requestAnimationFrameFrame; ++x) { - window.requestAnimationFrameFrame = window[vendors[x]+'requestAnimationFrameFrame']; + for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x]+'requestAnimationFrame']; window.cancelAnimationFrame = - window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelrequestAnimationFrameFrame']; + window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelrequestAnimationFrame']; } - if (!window.requestAnimationFrameFrame) - window.requestAnimationFrameFrame = function(callback, element) { + if (!window.requestAnimationFrame) + window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function() { callback(currTime + timeToCall); },