electron-windows
TypeScript icon, indicating that this package has built-in type declarations

34.0.0 • Public • Published

electron-windows

NPM version CI Test coverage node version npm download

Manage multiple windows of Electron gracefully and provides powerful features.

Contributors


xudafeng


sriting


snapre


ColaDaddyz


z0gSh1u


zlyi


moshangqi

This project follows the git-contributor spec, auto updated at Fri Apr 25 2025 11:40:35 GMT+0800.

Installment

$ npm i electron-windows --save

Demo

APIs

init

const WindowManager = require('electron-windows');
const windowManager = new WindowManager();

create

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)

Readme

Keywords

Package Sidebar

Install

npm i electron-windows

Weekly Downloads

42

Version

34.0.0

License

MIT

Unpacked Size

13.3 kB

Total Files

6

Last publish

Collaborators

  • xudafeng