- From: John Daggett <jdaggett@mozilla.com>
- Date: Thu, 6 Sep 2012 20:03:39 -0700 (PDT)
- To: Glenn Adams <glenn@skynav.com>
- Cc: www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Glenn Adams wrote: >>>> // notify completion, even if no fonts load >>>> void notifyAfterCompletion(); >>> >>> The utility of this method seems particularly questionable. What should a UA >>> do when this is called? >> >> If FontLoader.readyState is "loading", nothing. >> >> If it's "idle", fire an "allcomplete" event anyway. > > Then what is the point? Why have the client code call a method to > that only translates to firing allcomplete when the client code can > invoke the same allcomplete handler? This API is a way of sync'ing with layout changes that might or might not initiate font loads. The client code can't call the allcomplete handler until layout changes are processed. In most cases the code below would work but it would be nicer to have this done by the user agent: setTimeout(function () { if (document.fontloader.readyState == "idle") doStuff(); }, 100); Ping me on irc if you want to discuss. Cheers, John
Received on Friday, 7 September 2012 03:04:06 UTC