12345678910111213141516171819202122232425262728 |
- const {app, BrowserWindow} = require('electron')
- const url = require('url')
- const path = require('path')
- let win
- function createWindow() {
- win = new BrowserWindow({
- width: 800,
- height: 600,
- webPreferences: {
- nodeIntegration: true
- },
- menu: null,
- })
-
- win.loadURL(url.format ({
- pathname: path.join(__dirname, 'index.html'),
- protocol: 'file:',
- slashes: true
- }))
- }
- app.on('ready', createWindow)
- app.on('browser-window-created',function(e,window) {
- window.setMenu(null);
- });
|