Permissions-Policy: local-fonts
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
HTTP Permissions-Policy
标头的 local-fonts
指令控制当前文档是否允许通过 Window.queryLocalFonts()
方法收集用户本地安装的字体的数据。
具体而言,如果定义的策略阻止使用此特性,则 Window.queryLocalFonts()
将以 SecurityError
类型的 DOMException
拒绝其返回的 Promise
。
语法
http
Permissions-Policy: local-fonts=<allowlist>;
<allowlist>
-
允许使用该特性的来源列表。参见
Permissions-Policy
。
默认策略
local-fonts
的默认允许列表为:self
。
规范
Specification |
---|
Local Font Access API # permissions-policy |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
local-fonts |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- 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.