[whatwg] Proposal: createImageBitmap should return a "Promise" instead of using a callback
Anne van Kesteren
annevk at annevk.nl
Wed Jun 19 19:18:07 PDT 2013
On Wed, Jun 19, 2013 at 10:19 PM, Justin Novosad <junov at 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/
More information about the whatwg
mailing list