forked from platypush/platypush
Added beforeinstallprompt listener
This commit is contained in:
parent
9ba7ad9402
commit
14d6924338
1 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,14 @@ export default {
|
||||||
this.initConfig()
|
this.initConfig()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
beforeMount() {
|
||||||
|
window.addEventListener('beforeinstallprompt', (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
if (confirm('Would you like to install the application for more features?'))
|
||||||
|
e.prompt()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
bus.onNotification(this.onNotification)
|
bus.onNotification(this.onNotification)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue