- add: createPushSubscription :

'Subscribed to FreePlanet.app!',
  'You can now receive Notification and Messages.'
This commit is contained in:
Paolo Arena
2019-02-05 18:17:36 +01:00
parent d8e0ff0bc3
commit cb941568e2
11 changed files with 242 additions and 157 deletions

View File

@@ -5,6 +5,8 @@
import { register } from 'register-service-worker'
register(process.env.SERVICE_WORKER_FILE, {
ready() {
console.log('READY::: App is being served from cache by a service worker.')
@@ -12,7 +14,6 @@ register(process.env.SERVICE_WORKER_FILE, {
registered(registration) { // registration -> a ServiceWorkerRegistration instance
console.log('REGISTERED::: !!!', process.env.SERVICE_WORKER_FILE)
},
cached(registration) {
console.log('CACHED::: Content has been cached for offline use.')