Promise() vs. new Promise()

Boris Zbarsky bzbarsky at
Wed Aug 20 06:56:49 PDT 2014

On 8/20/14, 9:45 AM, Andrea Giammarchi wrote:
> Alex I think the new direction is to throw whenever a constructor is
> meant to be used as such. If you don't want to use new you can `var p =
> Object.create(Promise.prototype);, executor);`

This won't work correctly, since 'p' won't have the right internal 
slots.  So step 3 
will throw.


More information about the es-discuss mailing list