Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

SettingsManager.removeObserver()

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

Summary

This method is used to remove a callback function that has been added with SettingsManager.addObserver().

Syntax

SettingsManager.removeObserver(settingName, callback);

Parameters

settingName
The string representing the setting to stop to observe. The exact list of possible strings is device dependent. Each Gaia build can have its own list of settings. For an up to date list of those strings, take a look at the Gaia source code.
callback
The function to be removed from the callback stack.

Example

function myCallback(event) {
  console.log(event.settingName + ": " + event.settingValue);
}

// Start listening to changes on the wifi.enabled setting
navigator.mozSettings.addObserver('wifi.enabled', myCallback);

// Stop listening to changes on the wifi.enabled setting
navigator.mozSettings.removeObserver('wifi.enabled', myCallback);

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, MHasan, kscarfone, Sheppy, Jeremie
 Last updated by: chrisdavidmills,