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

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.

Thanks,
Peter

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