I'm new to Electron Js and i've tried all the snippets that i could find, but i'm still unable to disable the possibilities to enlarge the window to a full screen size. I'm running the last version of Electron Js and Windows 10.
Here is the source code :
const { app, BrowserWindow } = require('electron')
try {
require('electron-reloader')(module)
} catch (_) {} //For dev purposes only
function createWindow () {
const win = new BrowserWindow({
width: 700,
height: 700,
webPreferences: {
frame:false,
maximizable: false,
fullscreen: false,
nodeIntegration: true
}
})
win.setMenuBarVisibility(false)
win.loadFile('src/index.html')
}
app.whenReady().then(createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…