[whatwg] [Notifications] Behavior of Notification.requestPermission in workers
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
Re: [whatwg] [Notifications] Behavior of Notification.requestPermission in workers
On Mon, Jul 28, 2014 at 6:55 PM, Peter Beverloo bever...@google.com wrote: Any opinions? I prefer (4), add [Exposed=Window]. -- http://annevankesteren.nl/
Re: [whatwg] [Notifications] Behavior of Notification.requestPermission in workers
That'd work for me too. Peter On Mon, Jul 28, 2014 at 1:00 PM, Anne van Kesteren ann...@annevk.nl wrote: On Mon, Jul 28, 2014 at 6:55 PM, Peter Beverloo bever...@google.com wrote: Any opinions? I prefer (4), add [Exposed=Window]. -- http://annevankesteren.nl/