requestAnimationFrame polyfill

An example showing how to polyfill requestAnimationFrame function using Tizen 2.3.
window.requestAnimationFrame = (function() {
  return window.requestAnimationFrame ||
    window.webkitRequestAnimationFrame ||
    window.mozRequestAnimationFrame ||
    function(callback) {
      window.setTimeout(callback, 1000 / 60);
    };
})();

Responses

0 Replies