Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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> |