browserSettings.useDocumentFonts
一个 BrowserSetting
对象,其基础值是布尔值。
默认情况下,网页可以使用 CSS 属性(例如 font-family
)来指定所需的字体。此设置允许扩展指示 Firefox 忽略网页指定的字体,仅使用系统字体。
其基础值是一个布尔值:
true
:使用网页指定的字体。这是默认值。false
:使用系统字体。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
useDocumentFonts |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
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.
示例
将设置设为 false
:
js
function logResult(result) {
console.log(`设置已更改:${result}`);
}
browser.browserSettings.useDocumentFonts.set({ value: false }).then(logResult);