title: ElectronJS Webview cookies not getting cleared
body: <p>I am not able to clear the cookies of a website in Webview.</p>
  
  <p>I tried to clear storage using - </p>
  
  <pre><code>let session=require('electron');
    session.clearCache(function () {
      //   console.log("cache clear");
       });
      session.clearStorageData();
  
   session.defaultSession.cookies.get({}, (error, cookies) =&gt; {
    cookies.forEach((cookie) =&gt; {
      let url = '';
      // get prefix, like https://www.
      url += cookie.secure ? 'https://' : 'http://';
      url += cookie.domain.charAt(0) === '.' ? 'www' : '';
      // append domain and path
      url += cookie.domain;
      url += cookie.path;
  
      session.defaultSession.cookies.remove(url, cookie.name, (error) =&gt; {
        if (error) console.log(`error removing cookie ${cookie.name}`, error);
      });
    });
  });
  </code></pre>
  
  <p>Then I tried to clear cookies of webview by accessing <code>getWebContents()</code> but 'getWebContents()' is not available on console when I tried. How to access the webview and then clear session so that next user can't login with the last user's creds?</p>