privacy.services

The privacy.services property contains privacy-related settings controlling services offered by the browser or by third parties. Each property is a types.BrowserSetting object.

Properties

passwordSavingEnabled
A types.BrowserSetting object whose underlying value is a boolean. If true, the browser's password manager will offer to store passwords when the user enters them. Defaults to true.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
autofillAddressEnabledChrome Full support 70Edge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
autofillCreditCardEnabledChrome Full support 70Edge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
autofillEnabled
DeprecatedNon-standard
Chrome Full support YesEdge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
alternateErrorPagesEnabledChrome Full support YesEdge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
passwordSavingEnabledChrome Full support 38Edge No support NoFirefox Full support 56Opera Full support YesFirefox Android Full support 56
safeBrowsingEnabledChrome Full support YesEdge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
safeBrowsingExtendedReportingEnabledChrome Full support 42Edge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
searchSuggestEnabledChrome Full support YesEdge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
spellingServiceEnabledChrome Full support YesEdge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No
translationServiceEnabledChrome Full support YesEdge No support NoFirefox No support NoOpera Full support YesFirefox Android No support No

Legend

Full support  
Full support
No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

Examples

Disable the password manager if possible.

function onSet(result) {
  if (result) {
    console.log("success");
  } else {
    console.log("failure");
  }
}

  var getting = browser.privacy.services.passwordSavingEnabled.get({});
  getting.then((got) => {
    console.log(got.value);
    if ((got.levelOfControl === "controlled_by_this_extension") ||
        (got.levelOfControl === "controllable_by_this_extension")) {
      var setting = browser.privacy.services.passwordSavingEnabled.set({
        value: false
      });
      setting.then(onSet);
    } else {
      console.log("Not able to set passwordSavingEnabled");
    }
  });
Acknowledgements

This API is based on Chromium's chrome.privacy API.