Check out Firefox Developer Edition, the first browser built for developers like you. http://mzl.la/112VrtT

mozilla
Your Search Results

    DOMCursor

    This translation is incomplete. Please help translate this article from English.

    非標準
    This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

    概要

    DOMCursor オブジェクトは結果のリスト全体の継続的な操作を可能にしています。これは、結果のリストを非同期で反復することを許可したDOMRequest を拡張したものです。continue()メソッドが呼ばれるたびに、DOMCurosr はリストの次の要素へ移動を試み、結果の成功または失敗を呼び出します。

    属性

    DOMCursor.done
    最後の要素に達しているかを示します。

    Inherited from DOMRequest:

    DOMRequest.onsuccess
    A callback handler called when the operation represented by the DOMRequest is completed.
    DOMRequest.onerror
    A callback handler that gets called when an error occurs while processing the operation.
    DOMRequest.readyState
    A string indicating whether or not the operation is finished running. Its value is either "done" or "pending".
    DOMRequest.result
    The operation's result.
    DOMRequest.error
    Error information, if any.

    メソッド

    DOMCursor.continue()
    次のカーソルへと移動します。

    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 ? 21.0 (21.0) ? ? ?
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? ? 21.0 (21.0) ? ? ?

    仕様

    Not currently part of any specification.

    関連情報

    ドキュメントのタグと貢献者

    このページへの貢献者: khalid32, mantaroh, chikoski
    最終更新者: mantaroh,