browserSettings.ftpProtocolEnabled

A BrowserSetting object that determines whether the FTP protocol is enabled in the browser.

The underlying value is a boolean.

Note: From Firefox version 88 this setting is read-only.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
ftpProtocolEnabled
No
No
72
From version 88, this setting is read-only (see bug 1626365).
?
No
No
?
?
No
?
?
?

Examples

Toggle the setting:

function toggleAllowFtp() {

  function toggle(current) {
    console.log(`Current value: ${current.value}`);
    browser.browserSettings.ftpProtocolEnabled.set({value: !current.value});
  }

  browser.browserSettings.ftpProtocolEnabled.get({}).then(toggle);
}

browser.browserAction.onClicked.addListener(() => {
  toggleAllowFtp();
});

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings/ftpProtocolEnabled