privacy.services

Report problems with this compatibility data on GitHub
webextensions-desktopwebextensions-mobile
ChromeEdgeFirefoxOperaSafariFirefox for Android
autofillAddressEnabled
autofillCreditCardEnabled
autofillEnabled
DeprecatedNon-standard
alternateErrorPagesEnabled
passwordSavingEnabled
safeBrowsingEnabled
safeBrowsingExtendedReportingEnabled
searchSuggestEnabled
spellingServiceEnabled
translationServiceEnabled

Legend

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.

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.

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.

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.