browserSettings.ftpProtocolEnabled
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
ftpProtocolEnabled |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
示例
切换设置:
js
function toggleAllowFtp() {
function toggle(current) {
console.log(`当前值:${current.value}`);
browser.browserSettings.ftpProtocolEnabled.set({ value: !current.value });
}
browser.browserSettings.ftpProtocolEnabled.get({}).then(toggle);
}
browser.browserAction.onClicked.addListener(() => {
toggleAllowFtp();
});