Slide 6
Slide 6 text
// register PBS
const name = 'periodic-background-sync'
const status = await navigator.permissions.query({name})
if (status.state === 'granted') {
await registration.periodicSync.register('refresh', {
minInterval: 12 * 60 * 60 * 1000 // 12h
})
}