title: How to send messages to different windows in electron?
body: <p>I'm writing my first electron app, so please be lenient :)</p>
  
  <p>When the user presses a button on the main Window, there should open a new window which shows some json string.
  This event gets cought by ipcMain:</p>
  
  <pre><code>ipcMain.on("JSON:ShowPage", function(e, item) {
      createJSONWindow(item);
  })
  </code></pre>
  
  <p>This is the function where I create the new window:</p>
  
  <pre><code>function createJSONWindow(item) {
      let jsonWin = new BrowserWindow({
          width: 600,
          height: 800,
          center: true,
          resizable: true,
          webPreferences:{
              nodeIntegration: true,
              show: false
          }
      });
      jsonWin.loadFile("jsonView.html");
  
      ipcMain.on('JSON_PAGE:Ready', function(event, arg) {
          jsonWin.webContents.send('JSON:Display', item);
      })
  
      jsonWin.once('ready-to-show',()=&gt;{
          jsonWin.show()
      });
  
      jsonWin.on('closed',()=&gt;{
          jsonWin = null;
      });
  }
  </code></pre>
  
  <p>Now to my question, when I have multiple <code>JSONWindow</code>s open, every single one of them gets the <code>JSON:Display</code> Message and updates it's content. Shouldn't they work independently from each other? The <code>jsonWin</code> is always a new <code>BrowserWindow</code>, isn't it?</p>
  
  <p>Thanks in advance.</p>