summaryrefslogtreecommitdiffstats
path: root/lib/dombatcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dombatcher.js')
-rw-r--r--lib/dombatcher.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/dombatcher.js b/lib/dombatcher.js
index 07cba1a..190bb9c 100644
--- a/lib/dombatcher.js
+++ b/lib/dombatcher.js
@@ -6,24 +6,24 @@ var batch;
function call(fns) {
- var fn;
- while (fn = fns.shift()) fn();
+ var fn;
+ while (fn = fns.shift()) fn();
}
domBatch.read = function(fn) {
- batch = batch || setBatch();
- reads.push(fn);
+ batch = batch || setBatch();
+ reads.push(fn);
};
domBatch.write = function(fn) {
- batch = batch || setBatch();
- writes.push(fn);
+ batch = batch || setBatch();
+ writes.push(fn);
};
function setBatch() {
- return setTimeout(function() {
- call(reads);
- call(writes);
- batch = null;
- }, 0);
+ return setTimeout(function() {
+ call(reads);
+ call(writes);
+ batch = null;
+ }, 0);
} \ No newline at end of file