W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] Web Notification: API inconsistency

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 23 Aug 2013 10:23:35 -0700
Message-ID: <CAAWBYDAKeqAUMjWKxXD_n5tjMGpfacT0vLwJJNxrtQN9jk70hA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHATWG <whatwg@lists.whatwg.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Fri, Aug 23, 2013 at 10:22 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Fri, Aug 23, 2013 at 6:09 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> If we want to continue returning void when a callback is passed, we need to
>> add some webidl magic for that...
>
> My idea was to always return a promise. And if a callback is passed
> you just pass that to the promise "as listener".

Yeah, we can just auto-add the callback as a .then() argument on the
returned promise.  Maybe then return the promise returned by .then(),
rather than the original?

~TJ
Received on Friday, 23 August 2013 17:24:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC