Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created May 11, 2018 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/00a9949fa7f17aee9d23879d36966952 to your computer and use it in GitHub Desktop.
Save goofmint/00a9949fa7f17aee9d23879d36966952 to your computer and use it in GitHub Desktop.
const Items = db.transaction(["items"], "readwrite").objectStore("items");
Items.get(3)
.onsuccess = function(event) {
const row = event.target.result;
row.name = "商品3の名前を変更";
Items
.put(row)
.onsuccess = function(event) {
console.log("更新しました");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment