title: How should I render web pages with Electron without showing them to the user?
body: <p>I need to render a web page in an Electron app and take a screenshot without showing this web page to the user. How should I do it? What's the best method?</p>
  
  <p>I tried creating a webview element and hiding by giving it an absolute positioning and -99999px top and left, but every now and then the capturePage method stalls forever. When I make it visible by using the inspector to remove that CSS, it looks blank but immediately the page renders and the callback is called.</p>
  
  <p>I tried <a href="https://electron.atom.io/docs/tutorial/offscreen-rendering/" rel="noreferrer">offscreen rendering</a> starting a BrowserWindow, but it actually creates another window, with no title bar, that looks like this:<a href="https://i.stack.imgur.com/pVArG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pVArG.png" alt="enter image description here"></a></p>
  
  <p>Any ideas how to make any of these work or another method?</p>