title: javascript: How to detect SVG in HTML img element support?
body: <p>javascript: How to detect SVG in HTML img element support?</p>
  
  <p>I tried this, but it doesn't work:</p>
  
  <pre><code>x = new Image();
  x.onload = function(){
    if (x.width) {
     alert('svg in img tag supported!');
    }
  };
  x.src = 'test.svg';
  </code></pre>