periodicSync Notification text message update
This commit is contained in:
parent
7601ca68ce
commit
638e9bf505
4 changed files with 11 additions and 4 deletions
|
|
@ -33,11 +33,12 @@ const registerPeriodicBackgroundSync = async (registration) => {
|
|||
}
|
||||
}
|
||||
|
||||
export function registerServiceWorker() {
|
||||
export function registerServiceWorker(periodicSyncNewMsgReminderTxt) {
|
||||
if("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker.register("./sw.js")
|
||||
.then(async registration => {
|
||||
console.log('Service Worker registered with scope:', registration.scope);
|
||||
registration.active.postMessage(periodicSyncNewMsgReminderTxt);
|
||||
await registerPeriodicBackgroundSync(registration);
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue