dom/indexedDB/test/bfcache_iframe2.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <script>
michael@0 5 var res = {};
michael@0 6 var request = indexedDB.open(parent.location, 2);
michael@0 7 request.onblocked = function() {
michael@0 8 res.blockedFired = true;
michael@0 9 }
michael@0 10 request.onupgradeneeded = function(e) {
michael@0 11 var db = e.target.result;
michael@0 12 res.version = db.version;
michael@0 13 res.storeCount = db.objectStoreNames.length;
michael@0 14
michael@0 15 var trans = request.transaction;
michael@0 16 trans.objectStore("mystore").get(42).onsuccess = function(e) {
michael@0 17 res.value = JSON.stringify(e.target.result);
michael@0 18 }
michael@0 19 trans.oncomplete = function() {
michael@0 20 parent.postMessage(JSON.stringify(res), "http://mochi.test:8888");
michael@0 21 }
michael@0 22 };
michael@0 23
michael@0 24 </script>
michael@0 25 </head>
michael@0 26 <body>
michael@0 27 This is page two.
michael@0 28 </body>
michael@0 29 </html>

mercurial