SkillAgentSearch skills...

RequestAnimationFrame

Polyfill for requestAnimationFrame/cancelAnimationFrame

Install / Use

/learn @darius/RequestAnimationFrame
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

requestAnimationFrame

requestAnimationFrame polyfill by Erik Möller.

Polyfill for requestAnimationFrame and cancelAnimationFrame. That is, load the included .js file to make those functions work (more or less) even on older systems that do not natively supply them.

This version of the code is only lightly tested. It's provoked no complaints since the initial checkin of 2013-9-16, but it hasn't been deliberately tested on a zillion targets either.

Credits

Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen Slavič, Darius Bacon

Adapted from https://gist.github.com/paulirish/1579671 which is derived from:

  • http://paulirish.com/2011/requestanimationframe-for-smart-animating/
  • http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating

To do

  • Incorporate improvements from:
    • http://stackoverflow.com/questions/13241314/up-to-date-polyfill-for-requestanimationframe
    • https://gist.github.com/mrdoob/838785

Support

Supported browsers

Contributing

Pull requests welcome. Please respect the code style in place.

License

MIT License

View on GitHub
GitHub Stars271
CategoryDevelopment
Updated1mo ago
Forks59

Languages

JavaScript

Security Score

95/100

Audited on Feb 6, 2026

No findings