I need to build an app that will span across multiple monitor screens, something like this: Electron suports multiple windows but how to comunicate between them?
Whenever we talk about communicating from one window to another window inside of an Electron application, you always want to be thinking of the IPC system, Inter Process Communication.
So in one window you will listen for an event, for example, a form submittal.
Once the form is submitted, you can take the text out of that input and emit an event to the Electron app.
Then the Electron app will trigger its own event and send the event on over to the mainWindow
which will receive the text and append it on to its list.
You can start this with just vanilla JavaScript in the secondary window.html file like so:
document.querySelector('form').addEventListener('submit', event => {
event.preventDefault();
});
So the above assumes you are working with a form you are trying to submit.