Re: [promises] Difficulties with using constructors and promises together

Brandon Wallace <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]>
That would definitely look weird and IMO would violate the principle of least astonishment.
 
--
Brandon
http://palladiumblog.wordpress.com/


________________________________
 From: Boris Zbarsky <[email protected]>
To: [email protected] 
Sent: Thursday, June 20, 2013 9:00 AM
Subject: Re: [promises] Difficulties with using constructors and promises  together
 

On 6/19/13 6:32 PM, Tab Atkins Jr. wrote:
> A few examples:
> * createImageBitmap()
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#images>
> * TaskScheduler.add() <http://web-alarms.sysapps.org/#interface-taskscheduler>

Apart from it not being supported yet in WebIDL, and possibly looking a 
bit weird from the point of view of a JS programmer, is there something 
in principle that prevents "new Foo()" from returning a Promise<Foo>?

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.