Change BrowserWindow property on Event


#1

This is what I have, I’ve commented the question inside the following code itself so that you can understand it easily:

const electron = require('electron');
const {
    app, BrowserWindow
} = electron;
app.on('ready', () => {
    let win = new BrowserWindow({
        width: 1200
        , height: 700
        , frame: true
        , resizable: false
    })
    win.loadURL(`file://${__dirname}/index.html`)
    win.once('ready-to-show', () => {
        win.show()
    });
    
    win.on('enter-full-screen'), () => { // this line is also wrong, what should be here?
        // what to write here to make it "resizable: true"
    }
})

Any help would be appreciated.


#2

Solved it, had to add this:

win.on('enter-full-screen', () => {
        // what to write here to make it "resizable: true"
        win.setResizable(true)
});