Community:
ServiceWorker is a great advance technology in terms of cache managment, but I have some questions associated with other operations such as:
Push Notification: I made a GCM integration (Google Clud Message) and NodeJS, following this article, the problem is that when GCM sends the information to the client (Chorme), the payload of the message generated by GCM is not accessible in the Notification in ServiceWorker Listener, which would be great for making decisions. Any Idea when data payload in notifications will be enabled?
Registration: Since ES6 is very mature, it would be good to register a ServiceWorker in other ways, for example:
import sw from './sw.js'
navigator.serviceWorker.register(sw, {scope: '/'}).then(function (registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function (err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
Is this possible or make sense?
Thanks!!!!