FontFaceSet: ready プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
ready
は FontFaceSet
インターフェイスの読み取り専用プロパティで、指定された FontFaceSet
を解決する Promise
を返します。
このプロミスが解決されるのは、文書のフォントの読み込みが完全に終了し、レイアウト処理が完了し、それ以上フォントを読み込む必要がなくなったときだけです。
値
指定された FontFaceSet
を解決する Promise
です。
例
次の例では、プロミスが解決されると ready
の値がコンソールに出力されます。
js
async function isReady() {
let ready = await document.fonts.ready;
console.log(ready);
}
isReady();
仕様書
Specification |
---|
CSS Font Loading Module Level 3 # dom-fontfaceset-ready |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ready |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full 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.