title: How to create a modal window and load HTML from render process?
body: <p>this is my current project structure:</p>
  
  <pre><code>main.js
  index.html
  download.html
  src/index.js
  src/style.css
  </code></pre>
  
  <p><code>main.js</code> will create a BrowserWindow and load <code>index.html</code>, which loads <code>index.js</code> and <code>style.css</code>.</p>
  
  <p>I'd like to create a new modal window and load <code>download.html</code> when a button is clicked in <code>index.html</code>.</p>
  
  <p>here is codes from my <code>index.js</code>:</p>
  
  <pre><code>btn.onclick = function() {
    let win = new remote.BrowserWindow({
      parent: remote.getCurrentWindow(),
      modal: true
    })
    win.loadURL(`file://${__dirname}/download.html`)
  }
  </code></pre>
  
  <p>but it's loading <code>file://download.html</code>, isn't <code>__dirname</code> existed in render process? </p>