title: Unable to showOpenDialog using electronjs and jquery
body: <p>I'm trying to create a simple desktop application using electronjs. My goal is open a <code>ShowOpenDialog</code>but for (unknown reason for me) it doesn't open nothing.<br>
  Tree view:  </p>
  
  <pre><code>sample app
   |-index.html
   |-js
     |--jquery.js
     |--index.js
   |-main.js
   |-package.json
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Hello World!&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;h1&gt;Hello World!&lt;/h1&gt;
      &lt;br /&gt;
      &lt;button id="openFile"&gt;Open&lt;/button&gt;
      &lt;script&gt;
          window.$ = window.jQuery = require('./js/jquery.js');
      &lt;/script&gt;
      &lt;sctipt src ="./js/index.js"&gt;&lt;/sctipt&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>$(document).ready(function() {    
      $("#openFile").click(function(){
          dialog.showOpenDialog(function (fileNames) {
          }); 
      })    
  })
  </code></pre>
  
  <p>main.js</p>
  
  <pre><code>'use strict';
  const electron = require('electron');
  const dialog = require('electron').dialog;
  const app = electron.app;
  const BrowserWindow = electron.BrowserWindow;
  
  let mainWindow;
  
  function createWindow () {
    mainWindow = new BrowserWindow({width: 800, height: 600});
    mainWindow.loadURL('file://' + __dirname + '/index.html');
    mainWindow.
    mainWindow.on('closed', function() {
      mainWindow = null;
    });
  }
  
  app.on('ready', createWindow);
  
  app.on('window-all-closed', function () {
    if (process.platform !== 'darwin') {
      app.quit();
    }
  });
  
  app.on('activate', function () {
    if (mainWindow === null) {
      createWindow();
    }
  });
  </code></pre>
  
  <p>And package.json</p>
  
  <pre><code>{
    "name": "electron-quick-start",
    "version": "1.0.0",
    "description": "A minimal Electron application",
    "main": "main.js",
    "scripts": {
      "start": "electron main.js"
    }
  }
  </code></pre>