diff options
-rw-r--r-- | History.md | 6 | ||||
-rw-r--r-- | README.md | 15 | ||||
-rw-r--r-- | bower.json | 2 | ||||
-rw-r--r-- | component.json | 2 | ||||
-rw-r--r-- | package.json | 2 |
5 files changed, 23 insertions, 4 deletions
@@ -1,4 +1,10 @@ +0.8.0 / 2013-10-14 +================== + + * change to a rAF loop technique of emtying frame queue to prevent frame conflicts + * add ability to call `FastDom#defer` with no frame argument to schedule job for next free frame + 0.7.1 / 2013-10-05 ================== @@ -81,7 +81,7 @@ fastdom.write(function() { }); ``` -### FastDom#defer(frames, callback[, context]) +### FastDom#defer([frames,] callback[, context]) Defers a job for the number of frames specified. This is useful is you have a particualrly expensive piece of work to do, and don't want it to be done with all the other work. @@ -91,6 +91,19 @@ For example; you are using third party library that doesn't expose an API that a fastdom.defer(3, expensiveStuff); ``` +`FastDom#defer` can also be called with no `frames` argument to push work onto next avaiable frame. + +```js +// Runs in frame 1 +fastdom.defer(expensiveStuff1); + +// Runs in frame 2 +fastdom.defer(expensiveStuff2); + +// Runs in frame 3 +fastdom.defer(expensiveStuff3); +``` + ### FastDom#clear(id) Clears **any** scheduled job by id. @@ -1,7 +1,7 @@ { "name": "fastdom", "description": "Eliminates layout thrashing by batching DOM read/write operations", - "version": "0.7.1", + "version": "0.8.0", "main": "index.js", "scripts": [ "index.js" diff --git a/component.json b/component.json index d318c23..a363a66 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "fastdom", "description": "Eliminates layout thrashing by batching DOM read/write operations", - "version": "0.7.1", + "version": "0.8.0", "main": "index.js", "scripts": [ "index.js" diff --git a/package.json b/package.json index c2e4272..84ddb9a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fastdom", "description": "Eliminates layout thrashing by batching DOM read/write operations", - "version": "0.7.1", + "version": "0.8.0", "main": "index.js", "scripts": { "test": "jshint . && mocha-phantomjs test/index.html" |