Last active
September 23, 2022 15:46
-
-
Save thangman22/369bdfe257bfd7681efeb3f296badbc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const swReg = await navigator.serviceWorker.ready | |
if('BackgroundFetchManager' in self) { | |
await swReg.backgroundFetch.fetch('postr-download', ['image.png'], { | |
title: 'Postr.me is capturing', | |
icons: [{ | |
sizes: '512x512', | |
src: '/assets/img/icon-512.png', | |
type: 'image/png' | |
}], | |
downloadTotal: 60 * 1024 * 1024 | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment