title: Atom Electron webview contextmenu, get click target
body: <p>So I'm working on a new project and we would like to create a desktop application for our users using Electron.</p>
  
  <p>The problem is that I need custom contextmenus on the webview elements.</p>
  
  <p>My progress so far that I can create contextmenus over the webview, but I cannot access the content under the click. :)</p>
  
  <p>index.html:</p>
  
  <pre><code>&lt;webview id="webViewDefault" class="active" src="http://example.com" minwidth="100%" minheight="100%" partition="somePartition" nodeintegration allowpopups&gt;&lt;/webview&gt;
  </code></pre>
  
  <p>renderer.js</p>
  
  <pre><code>    const electron = require('electron');
      const Menu = electron.remote.Menu;
  
  //Create contextmenu template
      const WebViewMenu = Menu.buildFromTemplate([{
          label: 'Button 1', click(){
              console.log('Button 1 clicked');
          }
      },
          {type: 'separator'}, {
              label: 'Button 2', click(){
                  console.log('Button 2 clicked');
              }
          }
      ]);
  
  //get webview
      let defaultWebview = document.getElementById("webViewDefault");
  
  //add event listner
      defaultWebview.addEventListener("contextmenu", (event) =&gt; {
          const t = event.srcElement.id.split('-');
          WebViewMenu.popup(electron.remote.getCurrentWindow());
      });
  </code></pre>
  
  <p>So how can I get for example a link's <code>href</code> attribute when a right click happens, so I can create a new tab for the user.</p>
  
  <p>The tabs are working great, creating new webviews, selecting the active ones etc. I just need to get the urls, from the links ...: D</p>