W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2014

[whatwg] [Notifications] Notification.hasPermission() instead of Notification.permission

From: Peter Beverloo <beverloo@google.com>
Date: Tue, 29 Apr 2014 18:24:42 +0100
Message-ID: <CALt3x6=kNZwZPT7a6aGHnRXHkOQT4mCi_Z=NCkXCGUJHj1_F3A@mail.gmail.com>
To: whatwg@whatwg.org
The Notification specification defines a static Notification.permission
accessor, which returns one of {granted, denied, default}. This requires
the browser to synchronously determine whether the page has permission to
show notifications, whereas checking this may be an asynchronous operation.
This is the case in Chrome.

Before this becomes a paradigm, could we consider having a static
hasPermission() instead, returning a Promise?

I'll add a UseCounter to Blink for tracking Notification.permission usage,
but it will take some time before conclusive usage data comes in.

Received on Tuesday, 29 April 2014 17:27:12 UTC

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