Re: [whatwg] Proposal: createImageBitmap should return a "Promise" instead of using a callback

On Wed, Jun 19, 2013 at 10:19 PM, Justin Novosad <junov@google.com> wrote:
> The proposal is to change the ImageBitmapFactories IDL to something like
> this:
>
> [NoInterfaceObject]
> interface ImageBitmapFactories {
>   Promise createImageBitmap(ImageBitmapSource image, optional long sx, long
> sy, long sw, long sh);
> };
>
> The value of the promise would resolve to an ImageBitmap object.
>
> What do we think?

I think something like

interface ImageBitmap {
  static Promise create(ImageBitmapSource image, optional long sx,
long sy, long sw, long sh);
};

would be much nicer.


--
http://annevankesteren.nl/

Received on Thursday, 20 June 2013 02:18:32 UTC