Jquery-IndexedDB: issue 18
Repro example for jquery-indexedDB issue https://github.com/axemclion/jquery-indexeddb/issues/18
by axemclion
HTML
<script src="http://nparashuram.com/jquery-indexeddb/jquery.indexeddb.js"></script>
<html>
<body>
<button onclick = "setup()">Create Object Store</button>
<button onclick = "addData()">Add Data</button>
<button onclick = "getall()">Get All</button>
<div id = "console"></div>
</body>
</html>
JavaScript
function setup() {
$.indexedDB("Defect_Tracker", {
"schema": {
"1": function(versionTransaction) {
var objectStore = versionTransaction.createObjectStore("Defect_Log");
}
}
});
}
function addData() {
$.indexedDB("Defect_Tracker").objectStore("Defect_Log").add({
"defectIndex" : 100,
"value" : new Date();
});
}