这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

check() 方法在 FontFaceSet returns whether all fonts in the given font list have been loaded and are available.

句法

bool = aFontFaceSet.check(font);
bool = aFontFaceSet.check(font, text);
					

返回

A 布尔 that is true if the font list is available

参数

范例

document.fonts.check("12px courier"); // returns true if the font courier is available at 12px
document.fonts.check("12px MyFont", "ß"); // returns true if the font 'MyFont' has a ß character.
					

规范

规范 状态 注释
CSS Font Loading Module Level 3
The definition of 'check' in that specification.
工作草案 初始定义

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
check Chrome 35 Edge ≤79 Firefox 41 IE ? Opera ? Safari 10 WebView Android 37 Chrome Android 35 Firefox Android 41 Opera Android ? Safari iOS Yes Samsung Internet Android 4.0

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

元数据

  • 最后修改:
  1. FontFaceSet
  2. 特性
    1. ready
  3. 方法
    1. check()
    2. load()
  4. 继承:
    1. EventTarget