On 1 May 2014 16:55, Jonas Sicking <jo...@sicking.cc> wrote: > function registrationHandler() { > navigator.push.register().then((endpoint) => { > sendBackToAppServer(endpoint); > navigator.push.registrationNeeded.then(registrationHandler); > } > } > navigator.push.registrationNeeded.then(registrationHandler);
If it's going to happen over and over, why not an event? function register() { navigator.push.register().then(endpoint => sendToAppServer(endpoint)); } navigator.push.onderegister = e => register; Of course, you would have to set some expectations around how quickly the browser is required to detect this error. 30 minutes is a pretty common liveness interval for these things, which might not meet the usual timeliness expectations for applications.