Re: [css3-fonts] rethinking font load events

Tab Atkins 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.

Right, put another way it's roughly equivalent to:

  document.fontloader.onallcomplete = doStuff;
  setTimeout(function() { if (document.fontloader.readyState == "idle") doStuff(); }, 100);

Cheers,

John

Received on Friday, 7 September 2012 01:24:09 UTC