From 34c978a93970f70ff251169c64a9b1451e6cf728 Mon Sep 17 00:00:00 2001 From: remy Date: Fri, 15 Apr 2011 16:06:32 +0100 Subject: [PATCH] added storage event demo --- demos.json | 11 ++++++++-- demos/storage-events.html | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 demos/storage-events.html diff --git a/demos.json b/demos.json index b43c0f7..3963bee 100644 --- a/demos.json +++ b/demos.json @@ -1,4 +1,12 @@ [ + { + "desc": "Storage events", + "url": "storage-events", + "tags": "storage", + "support": { + "live": "chrome safari opera firefox" + } + }, { "desc": "dataset (data-* attributes)", "url": "dataset", @@ -15,8 +23,7 @@ "notes": "Uses onpopstate event", "tags": "history", "support": { - "live": "chrome safari", - "nightly": "firefox" + "live": "chrome safari firefox" }, "test": "Modernizr.history" }, diff --git a/demos/storage-events.html b/demos/storage-events.html new file mode 100644 index 0000000..bdef67b --- /dev/null +++ b/demos/storage-events.html @@ -0,0 +1,44 @@ +Storage Events + +
+
+

Directions: open multiple windows or tabs with this demo and change the text below.

+

The storage event triggers on the "blurred" windows, giving us a way to communicate across windows using localStorage.

+
+

(this is only echoed on other windows)

+

Waiting for data via storage event...

+
+
+
+