Baseline Widely available
Note: This feature is available in Web Workers.
The loadingerror
event fires when fonts have finished loading, but some or all fonts have failed to load.
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 Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4