Closed lurein closed 4 years ago
Update: I figured out a solution on this using ipcMain / Renderer.
In src/main/index.js
import { app, BrowserWindow, ipcMain} from 'electron'
and then
ipcMain.on('readyPush', () =>{ console.log('initialize push notifs here') })
in src/renderer/FirstPage.vue
mounted () { this.$electron.ipcRenderer.send('readyPush') },
this should work, since with our vue framework the window has no did-finish-load event, the mounted hook should work in its place. A note that confused me for a while - console.log statements in the main/index.js file don't appear in the devtools - they show up in the terminal window
Describe the issue / bug.
I need to initialize a push notification module on the webcontents did-finish-load event, but I understand that under this framework that doesn't fire at any point. How would I go about implementing this otherwise? #