W3C home > Mailing lists > Public > www-style@w3.org > September 2012

Re: [css3-fonts] rethinking font load events

From: John Daggett <jdaggett@mozilla.com>
Date: Thu, 6 Sep 2012 18:23:43 -0700 (PDT)
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>, Glenn Adams <glenn@skynav.com>
Message-ID: <1213597142.5570187.1346981023170.JavaMail.root@mozilla.com>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT