W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

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

From: Brandon Wallace <brandon.wallace@yahoo.com>
Date: Thu, 20 Jun 2013 07:31:56 -0700 (PDT)
Message-ID: <1371738716.86812.YahooMailNeo@web162205.mail.bf1.yahoo.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>, "www-dom@w3.org" <www-dom@w3.org>
That would definitely look weird and IMO would violate the principle of least astonishment.
 
--
Brandon
http://palladiumblog.wordpress.com/


________________________________
 From: Boris Zbarsky <bzbarsky@MIT.EDU>
To: www-dom@w3.org 
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
Received on Thursday, 20 June 2013 14:32:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:21 UTC