question

hellokevinpas avatar image
hellokevinpas asked

window.requestAnimationFrame is throwing an exception

I'm working on my fourth webapp ( see list here: http://kevinpas.github.io/ ). In this new app I'm using window.requestAnimationFrame() instead of window.setInterval(). I'm using a pretty new Amazon Web App Tester. If I run the app in the web app tester I'm having the following problem: window.requestAnimationFrame() is throwing an exception in both a lg smart phone and a Samsung tablet. When I use window.setInterval() everything works fine on these and in ie 11 or ff 28. (Using window.requestAnimationFrame() or window.setInterval(), works fine in ie 11, and firefox 28.) Best practices says to use requestAnimationFrame() : https://developer.amazon.com/appsandservices/solutions/platforms/webapps/docs/best-practices.html If I use "window.requestAnimationFrame( params)" I get: window.requestAnimationFrame() --> TypeError: Object [ object DOMWindow ] has no method 'requestAnimationFrame' If I use "requestAnimationFrame( params )" I get ReferenceError: requestAnimationFrame is not defined. Does anyone know why this is happening?
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

hellokevinpas avatar image
hellokevinpas answered
I'm closing this and moving it to webapps. I guess I was looking at "dev tools" and not "fire tablets". Sorry.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.