SettingsManager.onsettingchange

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

Summary

The onsettingchange property lets you set an event handler to be called for all setting changes.

Syntax

SettingsManager.onsettingchange = funcRef;

Where funcRef is a function to be called when a setting state change. This function will receive as input a MozSettingsEvent describing the setting that changed.

Example

// 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

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, teoli, abhishekp, kscarfone, Sheppy, Jeremie
 Last updated by: chrisdavidmills,