Hello! Thank you for sharing these resources.
I tried in my Ionic / Vue project with its code in the mounted function () and it doesn't work. The button has the display property in none always
`mounted() {
const $button = document.querySelector('#installButton')
pwaInstallHandler.addListener((canInstall) => {
$button.style.display = canInstall ? 'inline-block' : 'none'
})
$button.addEventListener('click', () => {
pwaInstallHandler.install().then((isInstalled) => {
console.log(
isInstalled
? 'User accepted installation prompt'
: 'User rejected installation prompt'
)
})
})`
any suggestions?
Hello! Thank you for sharing these resources.
I tried in my Ionic / Vue project with its code in the mounted function () and it doesn't work. The button has the display property in none always
`mounted() {
const $button = document.querySelector('#installButton')
any suggestions?