Skip to content

Instantly share code, notes, and snippets.

@Akifcan
Created July 7, 2021 18:34
Show Gist options
  • Save Akifcan/64f7b04b3ba296999962423bb55d1644 to your computer and use it in GitHub Desktop.
Save Akifcan/64f7b04b3ba296999962423bb55d1644 to your computer and use it in GitHub Desktop.
update
var objectStore = db.transaction(["files"], "readwrite").objectStore("files");
var request = objectStore.get(1);
request.onsuccess = function(event) {
var data = event.target.result;
data.name = 'this is kitten cat'
var requestUpdate = objectStore.put(data);
requestUpdate.onerror = function(event) {
// Hata Anında
};
requestUpdate.onsuccess = function(event) {
// İşlem Başarılı
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment