MozSettingsEvent

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.

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

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/mozsettingsevent

API B2G Firefox OS Non-standard Reference Référence Settings