On 11/09/2013, at 8:18 PM, Boris Zbarsky <bzbar...@mit.edu> wrote:

> On 9/11/13 2:13 PM, Marcos Caceres wrote:
>>> callback PromiseInit = void (object resolve, object reject);
>>> [Constructor(PromiseInit init)]
>>> interface Promise {...}
>> 
>> What members does PromiseInit dictionary have? ^_^
> 
> It's not a dictionary.  It's a callback, like the IDL snippet above says.
> 
> So you'd do it like so in practice:
> 
>  var p = new Promise(function(resolve, reject) {
>    // do stuff here.
>  });

Ah, right! got confused as almost everything else in the platform with *Init is 
a dictionary. Maybe that should be renamed PromiseCallback. 

> 
> -Boris
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to