FontFaceSet: delete() メソッド
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.
delete()
は FontFaceSet
インターフェイスのメソッドで、集合からフォントを除去します。
CSS の @font-face
ルールを使用して集合に追加されたフォントフェイスは、対応する CSS に接続されたままであり、削除することはできません。
構文
js
delete(font)
引数
返値
論理値で、削除に成功した場合は true
、失敗した場合は false
を返します。
例
次の例では、新しい FontFace
オブジェクトを作成し、FontFaceSet
から削除します。
js
const font = new FontFace("MyFont", "url(myFont.woff2)");
document.fonts.delete(font);
仕様書
Specification |
---|
CSS Font Loading Module Level 3 # dom-fontfaceset-delete |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
delete |
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.