W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: Async Image -> ImageData conversion

From: Anne van Kesteren <annevk@annevk.nl>
Date: Thu, 25 Jun 2015 14:10:54 -0700
Message-ID: <CADnb78i4T3Lwb3pVis=yDuHF0Zt_JAgTkkwBBkK2c19FuH=dBQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Ashley Gullen <ashley@scirra.com>, "public-webapps@w3.org" <public-webapps@w3.org>, Jeff Muizelaar <jrmuizel@mozilla.com>
On Thu, Jun 25, 2015 at 1:57 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> The drawback of adding toBlob/toImageData to the various things ImageData
> can be constructed from is that it's a bit more spec complexity, but I don't
> see that as a showstopper, necessarily.

We should probably stick to the pattern of either having factory
methods or putting methods directly on various objects. Or maybe,
change them all to be static methods on the various classes:

  ImageBitmap.create(...)
  ImageData.create(...)
  ...

I would personally prefer this last pattern for creating instances
where we need to go through a promise.


-- 
https://annevankesteren.nl/
Received on Thursday, 25 June 2015 21:11:18 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:32 UTC