Skip to content

Commit

Permalink
Indexed DB: do not use window.event
Browse files Browse the repository at this point in the history
window.event is not standardized.
  • Loading branch information
brettz9 authored and annevk committed Mar 29, 2017
1 parent 8dc2b1c commit cd04edc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions IndexedDB/idbobjectstore_createIndex15-autoincrement.htm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var store = db.transaction("Store1", "readwrite").objectStore("Store1");

store.openCursor().onsuccess = t.step_func(function(e) {
var item = event.target.result.value;
var item = e.target.result.value;
store.index("CompoundKey").get([item.num, item.id]).onsuccess = t.step_func(function(e) {
assert_equals(e.target.result ? e.target.result.num : null, 100, 'Expected 100.');
t.done();
Expand All @@ -40,7 +40,7 @@
function(t, db) {
var store = db.transaction("Store2", "readwrite").objectStore("Store2");
store.openCursor().onsuccess = t.step_func(function(e) {
var item = event.target.result.value;
var item = e.target.result.value;
store.index("CompoundKey").get([item.num, item.id]).onsuccess = t.step_func(function(e) {
assert_equals(e.target.result ? e.target.result.num : null, 100, 'Expected 100.');
t.done();
Expand All @@ -49,4 +49,4 @@
},
"Auto-Increment Primary Key"
);
</script>
</script>

0 comments on commit cd04edc

Please sign in to comment.