diff options
author | Wilson Page <wilsonpage@me.com> | 2013-03-06 16:52:03 +0000 |
---|---|---|
committer | Wilson Page <wilsonpage@me.com> | 2013-03-06 16:52:03 +0000 |
commit | 1d4f4eeb88ef6252df611994bcf9daa85416581b (patch) | |
tree | 9ccaff01cfb7d8f06cb300185a4de484810f066f /lib/dombatch.js | |
parent | 4bf5df4ecb555adc27a0b342f6439c7958713705 (diff) | |
download | fastdom-1d4f4eeb88ef6252df611994bcf9daa85416581b.zip fastdom-1d4f4eeb88ef6252df611994bcf9daa85416581b.tar.gz fastdom-1d4f4eeb88ef6252df611994bcf9daa85416581b.tar.bz2 |
Updated lib filename
Diffstat (limited to 'lib/dombatch.js')
-rw-r--r-- | lib/dombatch.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/dombatch.js b/lib/dombatch.js deleted file mode 100644 index 190bb9c..0000000 --- a/lib/dombatch.js +++ /dev/null @@ -1,29 +0,0 @@ - -var domBatch = {}; -var reads = []; -var writes = []; -var batch; - - -function call(fns) { - var fn; - while (fn = fns.shift()) fn(); -} - -domBatch.read = function(fn) { - batch = batch || setBatch(); - reads.push(fn); -}; - -domBatch.write = function(fn) { - batch = batch || setBatch(); - writes.push(fn); -}; - -function setBatch() { - return setTimeout(function() { - call(reads); - call(writes); - batch = null; - }, 0); -}
\ No newline at end of file |