W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: [css-font-loading] FontFaceSet should inherit from EventTarget

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 21 Jun 2014 01:55:58 -0400
Message-ID: <53A51E6E.3050504@mit.edu>
To: www-style@w3.org
On 6/21/14, 1:39 AM, Tab Atkins Jr. wrote:
> I can do that, but aw, that's terrible.  Using inheritance for what is
> clearly a functionality mix-in is just a terrible abuse. :/

It really depends on what your goals are in terms of behavior.

If a library hooks EventTarget.prototype.addEventListener to do some 
logging, would it expect addEventListener calls on a FontFaceSet to be 
logged?  If so, then you want inheritance, not a mix-in.

Received on Saturday, 21 June 2014 05:56:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC