@rubix-code/electron-update-window-options
v1.1.1
Published
Update an electron window after it's already been created using the constructor options schema
Downloads
2
Readme
electron-update-window-options
This library allows you to update an electron window after it's already been created using the constructor options schema.
updateWindowOptions(browserWindow, { movable: false });
is the same as
new BrowserWindow({ movable: false });
But you can use this function after it's created
Examples/Usage
const { BrowserWindow, app } = require("electron");
const updateWindowOptions = require("electron-update-window-options");
app.on("ready", () => {
const browserWindow = new BrowserWindow({ movable: true });
browserWindow.setMovable(false);
// Is the same as
updateWindowOptions(browserWindow, { movable: false });
// But this is the same format as
// new BrowserWindow(/* this */);
});