title: mainWindow.webContents.send() not received by ipcRenderer.on() function
body: <p>In the electron main.js I am wanting to send an event from a child Window to a mainWindow. The way I thought to do this was by sending an event from childWindow to the Main Process, and the Main Process then sends an event to the mainWindow. </p>
  
  <pre><code>ipcMain.on('submit-form-data', (event, data) =&gt; {
  
      if (data) {
          console.log('send data to main window')
          mainWindow.webContents.send('submitted-form', data)
      }
  
          childWindow.hide();
      })
  </code></pre>
  
  <p>The childWindow successfully send it's form data to the main process. But when I want the main process to then send that data to the mainWindow, the event is not being picked up. I don't have an idea of what I can try to get this to work.</p>
  
  <p>index.html in the mainWindow</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
    &lt;title&gt;Main Window&lt;/title&gt;
    &lt;script&gt;
        var ipcRenderer = nodeRequire("electron").ipcRenderer;
  
        ipcRenderer.on("submitted-form", function (event, data) {
          alert('received data'); // this never gets called :(
        });
  &lt;/script&gt;
  </code></pre>