Indexed Database API 3.0

PHOTO EMBED

Sat Aug 02 2025 19:47:25 GMT+0000 (Coordinated Universal Time)

Saved by @Asneedarazali #javascript

const tx = db.transaction("books", "readwrite");
const store = tx.objectStore("books");
const request = store.put({title: "Water Buffaloes", author: "Slate", isbn: 987654});
request.onerror = function(event) {
  // The uniqueness constraint of the "by_title" index failed.
  report(request.error);
  // Could call event.preventDefault() to prevent the transaction from aborting.
};
tx.onabort = function() {
  // Otherwise the transaction will automatically abort due the failed request.
  report(tx.error);
};
content_copyCOPY

https://www.w3.org/TR/2025/WD-IndexedDB-3-20250731/