title: mainWindow.loadURL is not a function
body: <p>I am getting this error but not getting the solution to resolve this issue.</p>
  
  <blockquote>
    <p>mainWindow.loadURL is not a function </p>
  </blockquote>
  
  <pre><code>const electron = require('electron');
  const {Menu} = require('electron');
  const {app} = require('electron');
  const BrowserWindow = require('browser-window');
  const conn = require('mysql');
  const path = require('path');
  const url = require('url');
  var mainWindow;
  app.on('ready', function () {
      mainWindow = new BrowserWindow({ width: 1024, height: 768, backgroundcolor: 'black' });
      **mainWindow.loadURL(url.format({** //Here I am getting an error.
          pathname: 'popupcheck.html',
          protocol: 'file:',
          slashes: true
      }));
      mainWindow.webContents.openDevTools();
      mainWindow.setProgressBar(1);
  });
  </code></pre>