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

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Wed Jul 17 17:57:10 PDT 2013

On Thu, Jul 18, 2013 at 10:39 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Thu, 18 Jul 2013, Silvia Pfeiffer wrote:
>> We have the same issues with WebRTC, which already has a callback based
>> API, but there is a suggestion to replace/augment with a Promise based
>> API, so I just wanted to understand the motivation, potential
>> complications and implications.
> WebRTC's constructor is synchronous, no?

There are many callbacks in WebRTC and getUserMedia that are
asynchronous and the discussion revolves around where it would be
useful to change to a Promise-based model.
Related thread ends here:
http://lists.w3.org/Archives/Public/public-webrtc/2013Jul/0170.html -
no decisions or concrete proposals have been made, but the discussion

> I don't understand the relevance to createImageBitmap().

Sorry, I side-tracked this thread to a more fundamental discussion
about when it's appropriate to use introduce Promises in the Web
platform and this was the first function that got changed to follow
this new pattern FAIK.


More information about the whatwg mailing list