
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
electron-multi-monitor
Advanced tools
This package provides web developers with the ability to create applications which cover multiple browser windows via Electron. It removes the restriction for web developers to only have a single window to develop their product in.
The library will create linked JavaScript window
objects for you. Meaning you only need to worry about one window object. No need for special communication between the different windows; just pure JavaScript!
To see the library in action, clone the repository and run the example:
$ git clone https://github.com/pvrobays/electron-multi-monitor.git
$ cd electron-multi-monitor
$ npm i
$ npm run example
Overkill. But possible.
You can always check out the code from the demo, found in the example
folder.
Easiest way to install it is via npm:
npm install electron-multi-monitor
Next you'll be able to import the MultiMonitor object inside your Electron app:
import { MultiMonitor } from "electron-multi-monitor";
There are 2 ways of creating MultiMonitor instance:
const multiMonitor = MultiMonitor.instance;
const multiMonitor = new MultiMonitorFactory().create();
The multiMonitor
object can be used to adapt, move, interact with the opened windows within your Main process:
interface IMultiMonitor {
readonly monitors: BrowserWindow[];
openUrl(url: string, numberOfMonitors: number): Promise<void>;
destroyAllMonitors(): void;
}
Now you can open your multi-monitor page via the MultiMonitor instance:
multiMonitor.openUrl(url, numberOfWindowsToOpen)
.then(() => {
console.log("Monitor windows are opened have your URL loaded!");
});
This will open your url inside the number of windows you've defined.
Now you'll have the object window.electronMultiMonitor
available in your render process:
interface IElectronMultiMonitor {
readonly mainWindow: Window;
readonly otherMonitors: IOtherMonitor[];
readonly numberOfMonitors: number;
}
interface IOtherMonitor {
readonly htmlRoot: HTMLElement;
readonly window: Window;
}
It's now your responsibility to render the different UI elements on the different htmlRoots. If you don't want this responsibility, you can check out electron-multi-monitor-react which does all this for you.
Yes please! I'm looking for motivated contributors to help me. If you're interested don't hesitate to contact me.
FAQs
Create multi monitor applications using web development
We found that electron-multi-monitor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.