title: How do I save/export an SVG file after creating an SVG with D3.js (IE, safari and chrome)?
body: <p>I currently have a website using D3 and I'd like the user to have the option to save the SVG as an SVG file. I'm using crowbar.js to do this, but it only works on chrome. Nothing happens of safari and IE gives an access denied on the <code>click()</code> method used in crowbar.js to download the file.</p>
  
  <pre><code>var e = document.createElement('script'); 
  
  if (window.location.protocol === 'https:') { 
      e.setAttribute('src', 'https://raw.github.com/NYTimes/svg-crowbar/gh-pages/svg-crowbar.js'); 
  } else { 
      e.setAttribute('src', 'http://nytimes.github.com/svg-crowbar/svg-crowbar.js'); 
  }
  
  e.setAttribute('class', 'svg-crowbar'); 
  document.body.appendChild(e);
  </code></pre>
  
  <p>How do I download an SVG file based on the SVG element on my website in safari, IE and chrome?</p>