diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2019-03-25 19:12:32 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2019-04-27 09:22:59 +0200 |
| commit | c7d12a8aaaad45b6d131fedd8a2169348c0ef3f5 (patch) | |
| tree | 47bb320ffba03a69fbc886e627389076abcbbd90 /src/InstallNotification.vue | |
| parent | 0dd62c0291f401e7e66b569af4d021410378a43c (diff) | |
| download | brokentalents-c7d12a8aaaad45b6d131fedd8a2169348c0ef3f5.tar.gz brokentalents-c7d12a8aaaad45b6d131fedd8a2169348c0ef3f5.zip | |
Use es6 method syntax
Diffstat (limited to 'src/InstallNotification.vue')
| -rw-r--r-- | src/InstallNotification.vue | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/InstallNotification.vue b/src/InstallNotification.vue index a60ec9c..f870ee5 100644 --- a/src/InstallNotification.vue +++ b/src/InstallNotification.vue @@ -22,13 +22,13 @@ import Vue from 'vue'; export default Vue.component('install-notification', { - data: function() { + data() { return { deferredPrompt: undefined, }; }, methods: { - promptInstall: function(p) { + promptInstall(p) { this.$ga.event('PWA', 'available'); p.preventDefault(); this.deferredPrompt = p; @@ -37,15 +37,15 @@ export default Vue.component('install-notification', { this.deferredPrompt = null; }); }, - installed: function(e) { + installed(e) { this.$ga.event('PWA', 'installed'); }, }, - created: function() { + created() { window.addEventListener('beforeinstallprompt', this.promptInstall); window.addEventListener('appinstalled', this.installed); }, - destroyed: function() { + destroyed() { window.removeEventListener('beforeinstallprompt', this.promptInstall); window.removeEventListener('appinstalled', this.installed); }, |
