[whatwg] Web Notification: API inconsistency
Jeremie Patonnier
jeremie.patonnier at gmail.com
Fri Aug 23 05:16:53 PDT 2013
Hi!
I recently noticed the web notification spec [1] introduce an API
inconsistency.
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.
Best,
[1] http://notifications.spec.whatwg.org/#api
--
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
More information about the whatwg
mailing list