Re: [whatwg] Adding features needed for WebGL to ImageBitmap

On Wed, Jun 19, 2013 at 2:47 PM, Gregg Tavares <gman@google.com> wrote:
> If it was up to me I'd make createImageBitmap take on object with
> properties so that new options can be added later as in
>
>     createImageBitmap(src, callback, {
>        premultipliedAlpha: false,
>        colorspaceConversion: false,
>        x: 123,
>     });
>
> But I'm not familiar if there is a common way to make APIs take a options
> like this except for the XHR way which is to create a request, set
> properties on the request, and finally execute the request.

Passing an options object is the standard way.  Don't look to XHR for
*anything* about precedents.

~TJ

Received on Wednesday, 19 June 2013 22:02:27 UTC