When can I tell that I have opened a connection in indexedDB?
问题 In the getCursor_ function below, please explain how I could determine if IndexedDb has opened and if not re-run function once it has? The getCursor_ runs correctly. However, since all of these calls are asynchronous, the function fails when executing before the database has completed opening. This code is executed in a separate process: var ixDb; var ixDbRequest; ixDbRequest = window.indexedDB.open(dbName, dbVersion); ixDbRequest.onsuccess = function (e) { ixDb = ixDbRequest.result || e