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

[whatwg] Web Notification: API inconsistency

From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Date: Fri, 23 Aug 2013 14:16:53 +0200
Message-ID: <CAEi838kFoKwEQ=+Zxz40SZV9KuxnJRptww4rQwXd9oCjq6Jk2g@mail.gmail.com>
To: whatwg@whatwg.org

I recently noticed the web notification spec [1] introduce an API

The spec define two static methods: `requestPermission` and `get`
I'm a bit puzzled because `requestPermission` expect a callback function
where `get` return a `Promise`.

As it seams obvious that both method are asynchronous, I find difficult to
have 2 different behaviors on such mater. In an author point of view, it
would be nice to have a coherent behavior here. Both method can get a
callback or return a Promise, I don't care, but it could be better for
author to have both doing the same.


[1] http://notifications.spec.whatwg.org/#api
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Friday, 23 August 2013 12:18:05 UTC

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