let objectStore = db.createObjectStore("data", { keyPath: null });
// First, add all our data to the object store.
let addedData = 0; for (let i in objectStoreData) {
request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
request.onerror = errorHandler;
request.onsuccess = function (event) { if (++addedData == objectStoreData.length) {
testGenerator.next(event);
}
};
}
event = yield undefined; // testGenerator.send
// Now create the index.
objectStore.createIndex("set", "", { unique: true });
yield undefined; // success
let trans = db.transaction("data", "readwrite");
objectStore = trans.objectStore("data");
let index = objectStore.index("set");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.