W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Re: [css3-fonts] FontLoader event handlers

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 27 Jan 2013 22:41:36 -0800
Message-ID: <CAAWBYDD=LrQLhDN98L-QqK+Ap34GZqhBHXCfMoQmOMjoRpxXKA@mail.gmail.com>
To: John Daggett <jdaggett@mozilla.com>
Cc: www-style list <www-style@w3.org>
On Sun, Jan 27, 2013 at 6:01 PM, John Daggett <jdaggett@mozilla.com> wrote:
> As I understand it, several people are wondering why the FontLoader
> interface includes explicit event handler attributes, rather than
> simply defining a set of events to be used with addEventListener (the
> current draft defines both) [2]:
>   attribute EventHandler onloading;
>   attribute EventHandler onloadingdone;
>   attribute EventHandler onloadstart;
>   attribute EventHandler onload;
>   attribute EventHandler onerror;
> I think the assertion here is that "modern" interfaces don't include
> event handler attributes.  However, based on discussions with others
> at Mozilla, I don't think that's really true.  As ms2ger pointed out
> on IRC, recent API's *do* include these (e.g. XHR, WebSocket,
> FileReader, IndexedDB) and in general they improve "developer
> ergonomics".

Yes, doing both is more or less best practice now.  onfoo
attributes/properties are easy to use for simple cases, and
addEventListener is necessary for more complex ones.

> Another point was brought up about progress events for font loads.  I
> think we could put these in but since font loading in many cases
> involves multiple load operations, I don't think they are as simple to
> define as they would be for things like XHR requests.

It would be great to look into this in the future, but I think it's
okay to defer it for now.

Received on Monday, 28 January 2013 06:48:24 UTC

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