title: s.substr is not a function
body: <p>I am using <a href="https://github.com/canvg/canvg" rel="nofollow noreferrer">canvg</a>, but when I run this:</p>
  
  <pre><code>jQuery("#print").on("click", function() {
      mySvg();
  });
  
  function mySvg() {
      var svg = jQuery("#map svg");
    canvg(document.getElementById('canvas'), svg);
  }
  </code></pre>
  
  <p>I get this in console</p>
  
  <blockquote>
    <p>canvg.js:58 Uncaught TypeError: s.substr is not a function</p>
  </blockquote>
  
  <p>Here it is <a href="http://jsfiddle.net/6r2jug6o/339/" rel="nofollow noreferrer">a jsFiddle</a></p>