How does js monitor font download completion?

now do a project, and then there is a loading,loading that loads static resources such as pictures and fonts, but how can I tell if the fonts have been downloaded?
is currently used as
@ font-face {

font-family: "FZZZHUNHJW";
src: url("../../assets/font/FZZZHUNHJW.ttf");

}
beg on your knees for guidance

Jul.07,2022

document.fonts.ready.then (function () {
/ / Logic
} after the font is loaded);

https://developer.mozilla.org...


document.fonts.ready.then(function() {
  // 
});

look at your font path is local, do not download! When using loading, you usually use


window.onload


how many masks?
ider.org/" rel=" nofollow noreferrer "> http://font-spider.org/ to learn about

Menu