Revision 8efcf2b57818807058a785bc55ebe13cb0139123 authored by Philip Jägenstedt on 29 March 2018, 13:44:01 UTC, committed by Geoffrey Sneddon on 29 March 2018, 13:44:01 UTC
This was inverted so that the Windows instructions were printed on Linux. Rather than just changing the condition, switch the messages, to match the order of some preceding code.
1 parent 604d17e
idbworker.js
var db
self.addEventListener('message', MessageHandler, false)
function MessageHandler(e)
{
var open_rq, idb = self.indexedDB || self.msIndexedDB || self.webkitIndexedDB || self.mozIndexedDB
if (!idb)
{
self.postMessage(false)
return
}
else
self.postMessage(true)
open_rq = idb.open("webworker101", 1)
open_rq.onupgradeneeded = function(e) {
db = e.target.result
db.createObjectStore("store")
.add("test", 1)
}
open_rq.onsuccess = function(e) {
db = e.target.result
db.onerror = function() { self.postMessage("db.error") }
db.transaction("store").objectStore("store").get(1).onsuccess = function(e) {
self.postMessage(e.target.result)
db.close()
}
}
open_rq.onerror = function() { self.postMessage("open.error") }
open_rq.onblocked = function() { self.postMessage("open.blocked") }
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...