This API is available on Firefox OS for internal applications 仅。

摘要

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

句法

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.

范例

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

规范

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

另请参阅

元数据

  • 最后修改: