- From: Peter Beverloo <beverloo@google.com>
- Date: Mon, 28 Jul 2014 12:55:59 -0400
- To: WHATWG <whatwg@whatwg.org>
Since the entire Notification object is exposed both on window and in
workers, I'd like some clarification on the intended behavior of
Notification.requestPermission() when called in the background.
http://notifications.spec.whatwg.org/#dom-notification-requestpermission
Some options:
(1) Request permission in any available foreground contexts. This could
be confusing. It could also be achieved by the worker sending a message to
any foreground windows, allowing the page to provide context about the
request.
(2) Invoke |callback| with the current permission level. This allows
developers to copy their code between windows and workers if they use the
Notification constructor within the callback when |permission| ==
"granted". This has my preference.
(3) Ignore.
Any opinions?
Thanks,
Peter
Received on Monday, 28 July 2014 16:56:25 UTC