Rewrite requestAnimationFrame search.