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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 16 Feb 2016 13:12:26 -0800
Message-ID: <CAAWBYDBSbw-DEak3D8WtM6kYoWbVPmUvsR=d9EX1MxvgaNwfsA@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>
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,

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.

Received on Tuesday, 16 February 2016 21:13:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:00 UTC