[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/API/IDBKeyRange/upperOpen [Back]  [Original]

IDBKeyRange: upperOpen - Web API | MDN

MDN Web Docs

View in English Always switch to English

IDBKeyRange: upperOpen

Baseline

20157

:

upperOpen IDBKeyRange

true
false

keyRangeValue = IDBKeyRange.upperBound("F", "W", true, true); (true) "F" "W" (IDBTransaction ) keyRangeValue IDBObjectStore.openCursor

upperOpen "true"

js
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("");
    }
  };
}

Indexed Database API 3.0
# ref-for-dom-idbkeyrange-upperopen


Web Proxy Viewer  |  New URL  |  Original Page