vite-pwa / nuxt

Zero-config PWA Plugin for Nuxt 3
https://vite-pwa-org.netlify.app/frameworks/nuxt
MIT License
454 stars 22 forks source link

fix: pass the results of userChoice to the developers #135

Closed QC-L closed 5 months ago

QC-L commented 6 months ago

There are times when we need to handle different logic based on the result of userChoice.

$pwa?.install().then((userChoice) => {
    if (userChoice.outcome === 'accepted') {
        console.log('accepted install');
    }
})
userquin commented 5 months ago

Note: if the user installs the app, some platforms will close the app in the browser and will open the installed PWA (for example Chrome and Edge in Windows Desktop).

Updating docs...