Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
IDBRequest インターフェイスの読み取り専用プロパティ source は、要求元 (インデックスやオブジェクトストアなど) を返します。(IDBFactory.open を呼んだときなど) 要求元が存在しない場合、null を返します。
メモ: この機能はウェブワーカー内で利用可能です。
IDBIndex、IDBObjectStore、IDBCursor などの、要求元を表すオブジェクトです。
以下の例では、タイトルを指定してレコードを要求し、onsuccess で IDBObjectStore から (objectStoreTitleRequest.result として参照できるようになった) 対応するレコードを取得し、レコードのプロパティ 1 個を更新し、更新したレコードを別の要求でオブジェクトストアに書き戻します。2 番目の要求の要求元が、開発者コンソールに記録されます。動く例全体は、To-do Notifications アプリケーションを参照してください。(動く例を見る)
| Indexed Database API 3.0 # ref-for-dom-idbrequest-source① |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年8月25日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.