Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electron-modules/electron-windows
Manage multiple windows of Electron gracefully and provides powerful features.
https://github.com/electron-modules/electron-windows
electron multi-windows
Last synced: about 1 month ago
JSON representation
Manage multiple windows of Electron gracefully and provides powerful features.
- Host: GitHub
- URL: https://github.com/electron-modules/electron-windows
- Owner: electron-modules
- Created: 2019-08-08T05:48:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-19T09:48:10.000Z (over 1 year ago)
- Last Synced: 2024-09-28T22:43:39.330Z (about 2 months ago)
- Topics: electron, multi-windows
- Language: JavaScript
- Homepage:
- Size: 435 KB
- Stars: 29
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-electron - electron-windows - Manage multiple windows of Electron gracefully and provides powerful features. ![](https://img.shields.io/github/stars/electron-modules/electron-windows.svg?style=social&label=Star) (Library / Window)
README
# electron-windows
[![NPM version][npm-image]][npm-url]
[![CI][CI-image]][CI-url]
[![Test coverage][codecov-image]][codecov-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/electron-windows.svg
[npm-url]: https://npmjs.org/package/electron-windows
[CI-image]: https://github.com/electron-modules/electron-windows/actions/workflows/ci.yml/badge.svg
[CI-url]: https://github.com/electron-modules/electron-windows/actions/workflows/ci.yml
[codecov-image]: https://img.shields.io/codecov/c/github/electron-modules/electron-windows.svg?logo=codecov
[codecov-url]: https://codecov.io/gh/electron-modules/electron-windows
[node-image]: https://img.shields.io/badge/node.js-%3E=_8-green.svg
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/electron-windows.svg
[download-url]: https://npmjs.org/package/electron-windows> Manage multiple windows of Electron gracefully and provides powerful features.
## Contributors
|[
xudafeng](https://github.com/xudafeng)
|[
sriting](https://github.com/sriting)
|[
ColaDaddyz](https://github.com/ColaDaddyz)
|[
snapre](https://github.com/snapre)
|[
zlyi](https://github.com/zlyi)
|[
moshangqi](https://github.com/moshangqi)
|
| :---: | :---: | :---: | :---: | :---: | :---: |This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Dec 27 2022 13:02:58 GMT+0800`.
## Installment
```bash
$ npm i electron-windows --save
```## Demo
![](./sceenshot.png)
## APIs
### init
```javascript
const WindowManager = require('electron-windows');
const windowManager = new WindowManager();
```### create
```javascript
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
});
```## TODO
- [ ] support storage of window configuration
- [ ] clone pointed window## License
The MIT License (MIT)