On Jul 12, 2014 2:11 AM, Jake Archibald jaffathec...@gmail.com wrote:
On 11 July 2014 17:59, Jonas Sicking jo...@sicking.cc wrote:
On Fri, Jul 11, 2014 at 8:17 AM, Jake Archibald jaffathec...@gmail.com
wrote:
navigator.serviceWorker.ready.then(function(reg) {
reg.push.register(...)
});
Currently serviceworker-dependent APIs are sitting in navigator.whatever,
but now we're adding a ServiceWorkerRegistration object (
https://github.com/slightlyoff/ServiceWorker/issues/365#issue-3745) it
feels like they should live there.
So instead of:
Yes, moving push (especially register, unregister and isRegistered) onto
ServiceWorkerRegistration instances would make the API a lot easier to use.
Currently it's order dependent, and if a developer tries to register before
they have registered a Service Worker, navigator.push.register will
On Fri, Jul 11, 2014 at 8:17 AM, Jake Archibald jaffathec...@gmail.com wrote:
navigator.serviceWorker.ready.then(function(reg) {
reg.push.register(...)
});
I agree this looks good. Though maybe
reg.registerPush(...)
instead?
/ Jonas
On 11 July 2014 17:59, Jonas Sicking jo...@sicking.cc wrote:
On Fri, Jul 11, 2014 at 8:17 AM, Jake Archibald jaffathec...@gmail.com
wrote:
navigator.serviceWorker.ready.then(function(reg) {
reg.push.register(...)
});
I agree this looks good. Though maybe
reg.registerPush(...)