FontFaceSetLoadEvent: FontFaceSetLoadEvent() constructor

The FontFaceSetLoadEvent() constructor creates a new FontFaceSetLoadEvent object which is fired whenever a FontFaceSet loads.

Syntax

js
new FontFaceSetLoadEvent(type)
new FontFaceSetLoadEvent(type, options)

Parameters

type

A string with the name of the event. It is case-sensitive and browsers always set it to loading, loadingdone, or loadingerror.

options Optional

An object that, in addition of the properties defined in Event(), can have the following properties:

fontfaces Optional

An array of FontFace instances. It defaults to the empty array.

Return value

A new FontFaceSetLoadEvent object.

Specifications

Specification
CSS Font Loading Module Level 3
# dom-fontfacesetloadevent-fontfacesetloadevent

Browser compatibility

BCD tables only load in the browser