title: Electron: How do I communicate with browser window?
body: <p>In Electron, I have the below script is my <code>main.js</code>, it's a shortcut that restores the window and focuses it, however I want to focus an input inside the window. How do I achieve that?</p>
  
  <p>main.js</p>
  
  <pre><code>app.on('ready', function(){
    createWindow();
    var ret = globalShortcut.register('Command+Control+Alt+G', function() {
      mainWindow.restore();
      mainWindow.focus();
      $('.js-search').focus();
    });
  })
  </code></pre>