request-interval
Like setInterval()
but using requestAnimationFrame().
You can also find requestTimeout
component here.
Installation
With npm do:
$ npm install request-interval --save
Install with component(1):
$ component install nk-components/request-interval
API
var requestInterval = ; var id = ; // [...]// stoprequestIntervalclearid;
If you need to support IE9, add a polyfill for requestAnimationFrame()
and cancelAnimationFrame()
License
MIT
Inspired by Joe Lambert's Gist.