--- title: DOMCursor slug: Web/API/DOMCursor tags: - API - DOM - DOM Reference - Gecko DOM Reference - Non-standard - Reference - WebAPI translation_of: Archive/B2G_OS/API/DOMCursor ---
DOMCursor オブジェクトは結果のリスト全体の継続的な操作を可能にしています。これは、結果のリストを非同期で反復することを許可した{{domxref("DOMRequest")}} を拡張したものです。{{domxref("DOMCursor.continue()","continue()")}}メソッドが呼ばれるたびに、DOMCurosr はリストの次の要素へ移動を試み、結果の成功または失敗を呼び出します。
Inherited from {{domxref("DOMRequest")}}:
{{page("/en-US/docs/Web/API/DOMRequest","Properties")}}
var sdcard = navigator.getDeviceStorage('sdcard');
var cursor = sdcard.enumerate();
cursor.onsuccess = function () {
console.log("File found: " + this.result.name);
// Once we found a file we check if there is other results
if (!this.done) {
// Then we move to the next result, which call the
// cursor success with the next file as result.
this.continue();
}
}
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | {{CompatUnknown}} | {{CompatGeckoDesktop("21.0")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatGeckoMobile("21.0")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Not currently part of any specification.