- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Wed, 1 Oct 2014 15:06:43 +0200
- To: Peter Beverloo <beverloo@google.com>
- Cc: WHATWG <whatwg@whatwg.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Jake Archibald <jaffathecake@gmail.com>, Jonas Sicking <jonas@sicking.cc>, Andrew Wilson <atwilson@google.com>
On Wed, Oct 1, 2014 at 2:56 PM, Peter Beverloo <beverloo@google.com> wrote: > One argument I came across for overloading requestPermission is the > following: > Promise.all([ Notification.requestPermission(), > swRegistration.push.requestPermission() ]).then(...); > > Might be worth considering, it's relatively cheap to support and can be > implemented without breaking backwards compatibility. One minor risk with also returning a promise is that exceptions for incorrect invocation would no longer throw an exception, but instead reject the promise. Otherwise I would never expect this promise to be rejected as the user declining notifications is not exceptional. I would be okay with adding this. -- https://annevankesteren.nl/
Received on Wednesday, 1 October 2014 13:07:14 UTC