title: Canvas.toDataURL not working on mobile Safari iOS?
body: <p>I tried the following. I created an <code>&lt;img&gt;</code> from an svg image. Then I draw it on a canvas and finally I exported it as PNG and set the resulting PNG as a new <code>&lt;img&gt;</code>. It works well on Android, Chrome, Safari, FireFox. But, <code>canvas.toDataUrl()</code> is not working on mobile Safari on iOS. It is only working when you don't use SVG images on the canvas.</p>
  
  <p>Here is the code I use for testing: </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="mydiv"&gt;&lt;/div&gt;
  &lt;img id="image2"&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>var mydiv  = document.getElementById('mydiv'),
      image2 = document.getElementById('image2');
  
  image2.crossOrigin="anonymous";
  
  var image3 = new Image();
  mydiv.appendChild(image3);
  image3.onload = function() {
    var canvas = document.createElement('canvas'),
    ctx = canvas.getContext('2d');
  
    canvas.width = image3.width;
    canvas.height = image3.height;
  
    ctx.drawImage(image3,0,0, canvas.width, canvas.height);
    var dataUrl = canvas.toDataURL('image/png');
    image2.src = dataUrl;
  }
  image3.crossOrigin="anonymous";
  image3.src = "https://dl.dropboxusercontent.com/u/47067729/sticker4.svg";
  </code></pre>
  
  <p>I created a JSFiddle here: <a href="http://jsfiddle.net/confile/ZqJYG/" rel="noreferrer">http://jsfiddle.net/confile/ZqJYG/</a></p>
  
  <p>The problem occurs only when you run it on iOS. It does not run on mobile Safari and not on mobile Chrome.</p>
  
  <p><strong>Is there a workaround for this problem?</strong></p>