- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
/* "[...] To fix this I added a delay at the end of the function and the events
now fire properly. Thank you for all of your help. Fixed Code:"
*/
data.indexedDB.addSource = function(sourceBlob) {
//adds source to data base
var version = 1;
var request = indexedDB.open("content", version);
request.onerror = errorHandler;
request.onsuccess = function(e) {
db = e.target.result;
var trans = db.transaction(["nContent"], "readwrite");
var store = trans.objectStore("nContent");
var request = store.put(sourceBlob);
trans.oncomplete = function(e) {
extron.indexedDB.getIndexedSource();
};
};
var token = 100000;
while(token != 0)
{
token = token-1;
}
};