title: How to save web contents to another html file
body: <p>I'm new to JavaScript and Electron Projects. I have a small task to Run a Webpage in which I have "download" button, if I hit the button I have to get all contents and sources code to be downloaded for the current page. Here my Sample work :</p>
  
  <p><strong>browser.js</strong></p>
  
  <pre><code>onload = function() {
  var webview = document.querySelector('webview');
  doLayout();
  
  document.querySelector('#back').onclick = function() {
  webview.goBack();
  };
  
  document.querySelector('#download').onclick = function() {
  
  var urlStr = webview.getURL()
  
  alert(urlStr)
  
  // alert(webview.getWebContents());
    };
  }
  </code></pre>
  
  <p>Currently I am able to get Url in Alert View, but I'm not able to get webpage contents </p>
  
  <p>Note: Please give solution only in JavaScript not in jQuery </p>