mozilla
Your Search Results

    SettingsLock

    この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

    Non-standard
    This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

    This API is available on Firefox OS for internal applications only.

    Each call to SettingsManager.createLock() create a new SettingsLock object.

    All SettingsLock objects are kept in a queue of active locks. When a SettingsLock object is created it's placed at the end of the queue. Calls to get/set places a request against the lock on which it's called. Requests run asynchronously and in the order they are placed against a lock. When the last request for a lock is run, and  the success/error event against it has been fired, the lock is removed from the queue and the next lock start to be processed.

    Properties

    SettingsLock.closed
    Indicates if the lock is no longer the active lock (true) or if it's still the active lock (false)

    Methods

    SettingsLock.set()
    Allows to change the values of a set of settings. This method is asychronous and return a DOMRequest object.
    SettingsLock.get()
    Allows to retrieve the value of a given setting. This method is asychronous and return a DOMRequest object.
    SettingsLock.clear()
    Clears any action that have not been done yet (remember that get and set are asynchronous)

    This method is added for testing and it deletes the whole settings DB!

    Specification

    Not part of any specification yet; however, this API will be discuss at W3C as part of the System Applications Working Group.

    See also

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

    Contributors to this page: Sheppy, MHasan, namolmes, Jeremie, justinpotts, teoli
    最終更新者: teoli,