Clicking the buttons below will toggle the class on the bacon ipsum text below, assigning the class with the same name (styles seen below). This is done using the new classList API.
Any elements with the contenteditable attribute set will have a grey outline as you hover over. Feel free to edit and change their contents. I'm using local storage to maintain your changes.
This code creates a table called 'foo' and inserts a single row. In a separate transaction, it drops the table then tries to insert in to the table 'foo' - obviously failing. That failure should cause the transaction to rollback, and leave the table 'foo' intact. The next transaction tries to select a row from the 'foo' table. If the rollback succeeds, you should see the status change to 'found rows'.
The data-[name] attribute on elements can now be accessed directly via the DOM using element.dataset.[attr].
+
Try openning the Web Console and editing element.dataset directly: element.dataset.foo = 'bar';
+
+
Not connected
+
+
This element has data
+
+
+
+
+
[click buttons above to show element html]
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/www/demos/canvas.html b/www/demos/canvas.html
new file mode 100644
index 0000000..460e883
--- /dev/null
+++ b/www/demos/canvas.html
@@ -0,0 +1,64 @@
+Canvas
+
+
\ No newline at end of file
diff --git a/www/demos/classlist.html b/www/demos/classlist.html
new file mode 100644
index 0000000..11fc42f
--- /dev/null
+++ b/www/demos/classlist.html
@@ -0,0 +1,75 @@
+Simple classList manipulation
+
+
+
Clicking the buttons below will toggle the class on the bacon ipsum text below, assigning the class with the same name (styles seen below). This is done using the new classList API.
Any elements with the contenteditable attribute set will have a grey outline as you hover over. Feel free to edit and change their contents. I'm using local storage to maintain your changes.
+
+
+
Go ahead, edit away!
+
Here's a typical paragraph element
+
+
and now a list
+
with only
+
three items
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/demos/database-rollback.html b/www/demos/database-rollback.html
new file mode 100644
index 0000000..abeda62
--- /dev/null
+++ b/www/demos/database-rollback.html
@@ -0,0 +1,78 @@
+Web SQL Database - rollback test
+
+
+
+
This code creates a table called 'foo' and inserts a single row. In a separate transaction, it drops the table then tries to insert in to the table 'foo' - obviously failing. That failure should cause the transaction to rollback, and leave the table 'foo' intact. The next transaction tries to select a row from the 'foo' table. If the rollback succeeds, you should see the status change to 'found rows'.
+
Status:
+ ready
+
+
+
\ No newline at end of file
diff --git a/www/demos/database.html b/www/demos/database.html
new file mode 100644
index 0000000..6aacf2a
--- /dev/null
+++ b/www/demos/database.html
@@ -0,0 +1,78 @@
+Web Database
+
+
+
+
We're using the Web Database API to store my tweets, so there's no Twitter API hit on load.
+
In addition, I'm using the since_id when we make new requests, so I shouldn't be doubling up on tweets.
+
Status: ready
+
+
+
+
None loaded up yet :-(
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/demos/dataset.html b/www/demos/dataset.html
new file mode 100644
index 0000000..6461943
--- /dev/null
+++ b/www/demos/dataset.html
@@ -0,0 +1,73 @@
+
+data-*
+
+
+
The data-[name] attribute on elements can now be accessed directly via the DOM using element.dataset.[attr].
+
Try openning the Web Console and editing element.dataset directly: element.dataset.foo = 'bar';
+
+
Not connected
+
+
This element has data
+
+
+
+
+
[click buttons above to show element html]
+
+
diff --git a/www/demos/dnd-upload.html b/www/demos/dnd-upload.html
new file mode 100644
index 0000000..7b1ceb9
--- /dev/null
+++ b/www/demos/dnd-upload.html
@@ -0,0 +1,116 @@
+Drag and drop, automatic upload
+
+
+
+
+
+
File API & FileReader API not supported
+
XHR2's FormData is not supported
+
XHR2's upload progress isn't supported
+
Upload progress:
+
Drag an image from your desktop on to the drop zone above to see the browser both render the preview, but also upload automatically to this server.
+
+
diff --git a/www/demos/drag-anything.html b/www/demos/drag-anything.html
new file mode 100644
index 0000000..3ebf484
--- /dev/null
+++ b/www/demos/drag-anything.html
@@ -0,0 +1,127 @@
+Simple Drag and Drop
+
+
+
+
Instructions: grab anything and drag it in to the drop zone below. I've included some text below, but you can drag urls, bookmarklets, files, anything.
+
Check out the functionality in different browsers, because the same content appears differently when dropped. Something to watch out for in the future.
+
Change the options below to see the difference between the default Text and sniffing for data (not supported in IE I'm afraid).
+
Try also dropping a few files from your desktop on the drop zone and notice the content-type: text/uri-list
+
+
+
\ No newline at end of file
diff --git a/www/demos/drag.html b/www/demos/drag.html
new file mode 100644
index 0000000..253b95e
--- /dev/null
+++ b/www/demos/drag.html
@@ -0,0 +1,146 @@
+Drag and drop
+
+
+
Drag the list items over the dustbin, and drop them to have the bin eat the item
+
+
diff --git a/www/demos/file-api-simple.html b/www/demos/file-api-simple.html
new file mode 100644
index 0000000..966ccde
--- /dev/null
+++ b/www/demos/file-api-simple.html
@@ -0,0 +1,39 @@
+File API (simple)
+
+
File API & FileReader API not supported
+
+
Select an image from your machine to read the contents of the file without using a server
+
+
+
diff --git a/www/demos/file-api.html b/www/demos/file-api.html
new file mode 100644
index 0000000..99d12f0
--- /dev/null
+++ b/www/demos/file-api.html
@@ -0,0 +1,39 @@
+File API
+
+
+
+
File API & FileReader API not supported
+
Drag an image from your desktop on to the drop zone above to see the browser read the contents of the file and use it as the background - without uploading the file to any servers.