Hey All,

Apologies if this isn't the right place to ask about the service worker
spec.

I've been implementing some things with service workers, and it's a little
bit frustrating to have to use

  self.registration.showNotification("hi!")

instead of the more normal:

  new Notification("hi!")

Is there a technical reason that service workers can't call the
Notification constructor as usual?

It would be nice for two reasons:

1. I could use the same wrapper library in-page and in-worker,
2. I'd be able to call .close() on the returned Notification.

Thanks,

Conrad

Reply via email to