Enqueue operations for later processing in a requestAnimationFrame() callback.
Get it:
npm install --save raf-q
Require it:
var rafq = require('raf-q');
Copy and paste either build/dom-q.js
or build/dom-q.min.js
into your project.
Create a queue with given executor function exec
.
Enqueue operation op
for processing. Each time the queue is drained the executor function passed to the constructor will be invoked sequentially, receiving each queued operation as parameter.
Enqueue callback function cb
to be called during the next processing batch, once all other operations in the queue have been applied.
© 2014 Jason Frame [ @jaz303 / jason@onehackoranother.com ]
Released under the ISC license.