FontFaceSet: loadingerror event
The loadingerror
event fires when fonts have finished loading, but some or all fonts have failed to load.
Syntax
Use the event name in methods like addEventListener()
, or set an event handler property.
addEventListener('loadingerror', event => { });
onloadingerror = event => { };
Example
In the following example, if the font Ephesis
fails to load, "Font loading error" is printed to the console.
document.fonts.onloadingerror = () => {
console.log('Font loading error');
}
(async () => {
await document.fonts.load("16px Ephesis");
})();
Specifications
No specification found
No specification data found for api.FontFaceSet.loadingerror_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.loadingerror_event
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.