var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || { READ_WRITE: "readwrite" };;
var db;
var transaction, objectStore;
var request = indexedDB.open("IndexedDBname", 1);
request.onsuccess = function (evt) {
db = request.result;
var deleteindex = db.transaction(["indexdbtable"], "readwrite")
.objectStore("indexdbtable")
.delete(1); // example if you want to delete index no 1
deleteindex.onsuccess = function(event) {
console.log("index 1 deleted" + "indexdbtable"); // log
};
};
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || { READ_WRITE: "readwrite" };;
var db;
var transaction, objectStore;
var request = indexedDB.open("IndexedDBname", 1);
request.onsuccess = function (evt) {
db = request.result;
var deleteindex = db.transaction(["indexdbtable"], "readwrite")
.objectStore("indexdbtable")
.delete(1); // example if you want to delete index no 1
deleteindex.onsuccess = function(event) {
console.log("index 1 deleted" + "indexdbtable"); // log
};
};
Komentar
Posting Komentar