Manage multiple windows of Electron gracefully and provides powerful features.
xudafeng |
sriting |
ColaDaddyz |
snapre |
zlyi |
moshangqi |
---|
This project follows the git-contributor spec, auto updated at Tue Dec 27 2022 13:02:58 GMT+0800
.
$ npm i electron-windows --save
const WindowManager = require('electron-windows');
const windowManager = new WindowManager();
const { app } = require('electron');
const winRef = windowManager.create({
name: 'window1',
loadingView: {
url: '',
},
browserWindow: {
width: 800,
height: 600,
titleBarStyle: 'hidden',
title: 'demo',
show: false,
webPreferences: {
nodeIntegration: app.isDev,
webSecurity: true,
webviewTag: true,
},
},
openDevTools: true,
storageKey: 'storage-filename', // optional. The name of file. Support storage of window state
storagePath: app.getPath('userData'), // optional. The path of file, only used when storageKey is not empty
});
- support storage of window configuration
- clone pointed window
The MIT License (MIT)