title: `document` is not defined Electron
body: <p>I'm trying to read JSON from a file using the <code>fs</code> module, and display that in a <code>div</code> with id <code>list</code> in an Electron app. My code in <code>index.js</code> looks like this:</p>
  <pre><code>dialog.showOpenDialog((filenames) =&gt; {
    if (!filenames) return;
        
    fs.readFile(filenames[0], (err, data) =&gt; {
      if (err) {
        alert('Could not read file.\n\nDetails:\n' + err.message);
        return;
      }
  
      let json = JSON.parse(data).en;
      for (let i = 0; i &lt; json.length; ++i) {
        let html = &quot;&lt;div class='entry'&gt;&lt;b&gt;&quot;;
        // Add more to html variable from json data
            
        $('list').html(html); 
      }
    });
  });
  </code></pre>
  <p>I get an error saying:</p>
  <blockquote>
  <p>Uncaught Exception:</p>
  <p>Error: jQuery requires a window with a document</p>
  </blockquote>
  <p>How do I modify the DOM from the JS, and why do I get this error?</p>