I have been getting this warning on my application that is using IndexedDB.
"Numeric transaction modes are deprecated in IDBDatabase.transaction. Use "readonly" or "readwrite""
which I didn't see that when I first wrote the app (about few months ago) but appear to get this warning every time it tries to access IDBDatabase.transaction.
on chrome console, it can properly recognize the following transaction key.
IDBTransaction.READ_WRITE
1
IDBTransaction.READ_ONLY
0
my example code that is doing IDB transaction:
IndexedDB.set = function(key, obj, onsuccess, oncomplete) {
var db = IndexedDB.db;
var trans = db.transaction([key], IDBTransaction.READ_WRITE);
var objectStore = trans.objectStore(key);
var request = objectStore.put(obj);
request.onsuccess = function(e) {
if (onsuccess !== undefined)
onsuccess(request.result);
};
request.onerror = function(e) {
console.log("Database error: " + e.target.errorCode);
};
trans.oncomplete = function(e) {
if (oncomplete !== undefined)
oncomplete(request.result);
};
};
should I have to worry about this? if so, how can I avoid this warning?
my chrome v: Version 21.0.1180.75
thanks for your comments.