• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. MozSettingsEvent

MozSettingsEvent

In This Article
  1. Summary
  2. Properties
  3. Example
  4. Specification
  5. See also

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

Summary

The MozSettingsEvent represents a settingchange event, providing information about a change to the value of a setting on the device. It extends the DOM Event interface.

Properties

MozSettingsEvent.settingName
A string indicating the exact name of the changed setting.
MozSettingsEvent.settingValue
The setting's new value.

Example

This example listens for changes to settings, reporting their names and new values on the console.

// Listen to changes on any settings
navigator.mozSettings.onsettingchange = function (event) {
  console.log(event.settingName + ": " + event.settingValue);
};

Specification

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

See also

  • SettingsManager
  • Settings API

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • Firefox OS
  • Non-standard
  • Reference
  • Référence
  • Settings
 Contributors to this page: chrisdavidmills, fscholz, MHasan, Sheppy, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:08:29 AM
See also
  1. Settings API
  2. Archive
  3. Events
    1. settingchange
  4. Related pages for Settings API
    1. MozSettingsEvent
    2. SettingsLock
    3. SettingsManager