summaryrefslogtreecommitdiffstats
path: root/examples/index.html
diff options
context:
space:
mode:
authorWilson Page <wilsonpage@me.com>2013-02-09 20:59:54 +0000
committerWilson Page <wilsonpage@me.com>2013-02-09 20:59:54 +0000
commitba984ea043828076c7a3f88e598d3f31afb912a8 (patch)
treedb6ee35609c416ce3244fa807d7fd27360ed517f /examples/index.html
downloadfastdom-origin/0.1.zip
fastdom-origin/0.1.tar.gz
fastdom-origin/0.1.tar.bz2
First commit0.1origin/0.1
Diffstat (limited to 'examples/index.html')
-rw-r--r--examples/index.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/examples/index.html b/examples/index.html
new file mode 100644
index 0000000..4fd62fb
--- /dev/null
+++ b/examples/index.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>title</title>
+<style>
+
+
+
+</style>
+</head>
+<body>
+ <div class='div1'></div>
+ <div class='div2'></div>
+ <div class='div3'></div>
+ <script type="text/javascript" src="../lib/dombatcher.js"></script>
+ <script>
+
+
+ var batch = new DomBatcher();
+
+ batch.write(function() {
+ console.log('write1');
+ });
+
+ batch.read(function() {
+ console.log('read1');
+ });
+
+ batch.read(function() {
+ console.log('read1');
+ });
+
+ batch.write(function() {
+ console.log('write1');
+ });
+
+
+ setTimeout(function() {
+ var batch = new DomBatcher();
+
+ batch.write(function() {
+ console.log('write2');
+ });
+
+ batch.read(function() {
+ console.log('read2');
+ });
+
+ batch.read(function() {
+ console.log('read2');
+ });
+
+ batch.write(function() {
+ console.log('write2');
+ });
+ }, 400);
+ </script>
+</body>
+</html> \ No newline at end of file