The indexedDB read-only property of the Window interface provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
An IDBFactory object.
The following code creates a request for a database to be opened asynchronously, after which the database is opened when the request's onsuccess handler is fired:
let db;
function openDB() {
const DBOpenRequest = window.indexedDB.open("toDoList");
DBOpenRequest.onsuccess = (e) => {
db = DBOpenRequest.result;
};
}IDBDatabaseIDBTransactionIDBKeyRangeIDBObjectStoreIDBCursor