[whatwg] The behaviour of Notification.requestPermission() in Workers

Tobie Langel tobie.langel at gmail.com
Thu Oct 24 04:46:50 PDT 2013


On Thursday, October 24, 2013 at 11:05 AM, Anne van Kesteren wrote:
> On Thu, Oct 24, 2013 at 2:19 AM, Nikhil Marathe <nsm.nikhil at gmail.com (mailto:nsm.nikhil at gmail.com)> wrote:
> > The easiest solution for implementors and authors is to make the
> > requestPermission() call in a HTML page before spawning a worker or
> > registering a service worker. Inside the Worker scope we then have two
> > options:
> > 1) requestPermission() is not defined.
> > 2) requestPermission() does not ask the user, but uses the permission
> > associated with that origin, or denied.
> > 
> > I believe option 2 is better in terms of having a complete API.
> > 
> > Feedback is appreciated about what the right approach should be.
> 
> Given that Notificaiton.permission exists, I'm not sure what the
> additional value of Notification.requestPermission() in a worker
> context would be.

Portability of code between worker and non worker? 

--tobie



More information about the whatwg mailing list