sinisterchipmunk/jax — Issue #37: IndexedDB setVersion requests being blocked
Author: gnatters
Created: 2011-12-07 20:58:35+00:00
State: open

I'm not sure exactly what causes setVersion request to be blocked but as far as I can tell something in the Jax environment must be causing it. I've also asked about it here http://stackoverflow.com/questions/8417469/indexeddb-setversion-request-being-blocked

The following code from within `after_initialize` results in the onblocked event firing (and the request failing to complete thus making it impossible to initialise an object store).

if @indexedDB and @objectStore and @key
idb_request = indexedDB.open @indexedDB
idb_request.onsuccess = (e) =>
idb = e.target.result
idb.onerror = (e) -> console.log e

version_request = idb.setVersion(0.1)
version_request.onblocked = (e) -> console.log e