summaryrefslogtreecommitdiffstats
path: root/examples/index.html
diff options
context:
space:
mode:
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