W3C home > Mailing lists > Public > www-style@w3.org > February 2016

Re: [css-font-loading] Events for FontFaceSet

From: Myles C. Maxfield <mmaxfield@apple.com>
Date: Tue, 23 Feb 2016 12:11:32 -0800
Cc: Simon Pieters <simonp@opera.com>, "www-style@w3.org" <www-style@w3.org>
Message-id: <A3E0A302-7C4E-4968-A49C-E75FE32D0D9D@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
I support this proposal.

—Myles
> On Feb 16, 2016, at 1:12 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Thu, Feb 11, 2016 at 1:56 AM, Simon Pieters <simonp@opera.com> wrote:
>> https://drafts.csswg.org/css-font-loading/#FontFaceSet-events
>> 
>> Why are the events named "loading", "loadingdone" and "loadingerror", rather
>> than using the same names as <img>/<video>/XHR?
>> 
>> loading -> loadstart
>> loadingdone -> load
>> loadingerror -> error
>> N/A -> loadend (fired after load/error, in the same task)
> 
> Because I wasn't thinking about making them consistent.
> 
> Originally there were two events fired "for the set" - loading and
> loadingdone - and three events fired for each face - loadstart, load,
> error.
> 
> When I switched the spec to promises, we no longer needed the per-face
> ones at all (those were replaced with promises), and I changed
> "loadingdone" to return all the successful fonts and added
> "loadingerror" to return the unsuccessful fonts.  This means I lost
> the previous "loadingdone" functionality that's covered by your
> suggested "loadend".
> 
> I don't have a problem with changing to be consistent if the current
> implementors are okay with it.
> 
> ~TJ
> 
Received on Tuesday, 23 February 2016 20:12:03 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:57 UTC