Indexed Database API 3.0

PHOTO EMBED

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

Saved by @Asneedarazali #javascript

const tx = db.transaction("books", "readonly");
const store = tx.objectStore("books");
const index = store.index("by_author");

const request = index.openCursor(IDBKeyRange.only("Fred"));
request.onsuccess = function() {
  const cursor = request.result;
  if (cursor) {
    // Called for each matching record.
    report(cursor.value.isbn, cursor.value.title, cursor.value.author);
    cursor.continue();
  } else {
    // No more matching records.
    report(null);
  }
};
content_copyCOPY

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