function displayData() {
const keyRangeValue = IDBKeyRange.bound("F", "W", true, true);
console.log(keyRangeValue.upperOpen);
const transaction = db.transaction(["fThings"], "readonly");
const objectStore = transaction.objectStore("fThings");
objectStore.openCursor(keyRangeValue).onsuccess = (event) => {
const cursor = event.target.result;
if (cursor) {
const listItem = document.createElement("li");
listItem.textContent = `${cursor.value.fThing}, ${cursor.value.fRating}`;
list.appendChild(listItem);
cursor.continue();
} else {
console.log("Entries all displayed.");
}
};
}IDBKeyRange: upperOpen property / notebook
IDBKeyRange: upperOpen property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.