Electron使用IPC(interprocess communication)在进程之间进行通讯
官网地址:devtron
# Install Devtron $ npm install --save-dev devtron // Run the following from the Console tab of your app's DevTools require('devtron').install() // You should now see a Devtron tab added to the DevTools
const { app, BrowserWindow} = require('electron') app.on('ready',()=>{ require('devtron').install() let mainWindow = new BrowserWindow({ width: 1600, height: 1200, webPreferences: { nodeIntegration: true } }) mainWindow.loadFile('index.html') mainWindow.webContents.openDevTools() })
Last updated 4 years ago
Was this helpful?