Back to Content

FontFaceSet: clear() method

files/en-us/web/api/fontfaceset/clear/index.md

latest427 B
Original Source

{{APIRef("CSS Font Loading API")}}{{AvailableInWorkers}}

The clear() method of the {{domxref("FontFaceSet")}} interface removes all fonts added via this interface. Fonts added with the {{cssxref("@font-face")}} rule are not removed.

Syntax

js-nolint
clear()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}