Electron - How to know when renderer window is ready

后端 未结 6 1180
执笔经年
执笔经年 2021-01-17 07:47

In my main process I create a renderer window:

var mainWindow = new BrowserWindow({
    height: 600,
    width: 800,
    x: 0,
    y: 0,
    frame: false,
           


        
6条回答
  •  心在旅途
    2021-01-17 08:24

    Use mainWindow.webContents like this:

    mainWindow.webContents.on('did-finish-load', () => {
      mainWindow.webContents.send('message', 'hello world');
    }

提交回复
热议问题