Re: [css3-fonts] rethinking font load events

On Fri, Sep 7, 2012 at 11:03 AM, John Daggett <jdaggett@mozilla.com> wrote:

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

I fail to see the relation between load completion and layout completion.
FontLoader should not be sensitive to layout state, just font loading
state. Again, I don't see a use case for the notify method as has been
described thus far. I'd prefer to discuss on this ML for the record.

Received on Friday, 7 September 2012 04:09:33 UTC