FontFaceSet: loading event
The loading
event fires when the document begins loading fonts.
Syntax
Use the event name in methods like addEventListener()
, or set an event handler property.
addEventListener('loading', event => { });
onloading = event => { };
Example
In the following example, when the font Ephesis
starts to load, "Font is loading..." is printed to the console.
document.fonts.onloading = () => {
console.log('Font is loading');
}
(async () => {
await document.fonts.load("16px Ephesis");
})();
Specifications
No specification found
No specification data found for api.FontFaceSet.loading_event
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
No compatibility data found for api.FontFaceSet.loading_event
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.