title: loadUrl is not working in electron
body: <p>i am new to electron.</p>
  
  <h2>i tried to run the index.js with following lines, it worked</h2>
  
  <pre><code>const electron = require("electron")
  const app = electron.app
  const BrowserWindow = electron.BrowserWindow
  var mainWindow = null
  
  app.on('ready', function () {
    mainWindow = new BrowserWindow({width: 800, height: 600})
  })
  </code></pre>
  
  <hr>
  
  <p>but when i tried to add this line,</p>
  
  <pre><code>mainWindow.loadUrl('file://${ __dirname}/index.html')
  </code></pre>
  
  <p>it return an error "typeError:mainWindow.loadUrl is not a function"</p>
  
  <p>i searched a lot for the answer, but didnt get any answer for this.</p>
  
  <p>can any suggest a solution for this?
  any help will be appreciated</p>