title: Drawing images to canvas with img.crossOrigin = "Anonymous" doesn't work
body: <p>In a client-side standalone JS application, I'm trying to make it so I can call toDataURL() on a canvas on which I've drawn some images specified by a URL. Ie I can input into a textbox the url to any image (hosted on, say, imgur) that I want to draw on the canvas, click a "draw" button and it will draw on the canvas. The end user should be able to save their final render as a single image, for this I'm using toDataURL().</p>
  
  <p>Anyway, until they actually fix that annoying "operation is insecure" error (gee, you're going to tell the end user what they can and can't do with their own data?) I followed a workaround that said to add the image to the DOM and set its crossOrigin property to "Anonmyous" and then draw it to the canvas. </p>
  
  <p>Here's a full working simplified version of my code (but in reality there will be many more features):</p>
  
  <pre><code>&lt;!DOCTYPE html5&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  #canvas {border:10px solid green;background-color:black;}
  #imgbox {border:2px solid black;}
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;canvas id="canvas" width=336 height=336&gt;&lt;/canvas&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;input size=60 id="imgbox"&gt;
  &lt;input type="submit" value="Draw" onclick=draw()&gt;
  &lt;script&gt;
  function draw() {
      var canvas = document.getElementById("canvas");
      var context = canvas.getContext("2d");
      var img = new Image();
      img.src = document.getElementById("imgbox").value;
      img.crossOrigin = "Anonymous";
      context.drawImage(img, 40, 40);
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Without the <code>img.crossOrigin = "Anonymous";</code> line, I could input <code>http://i.imgur.com/c2wRzfD.jpg</code> into the textbox and click draw and it would work. However as soon as I added that line, the whole thing broke and it won't even be drawn to the canvas at all.</p>
  
  <p>What do I need to change to fix this? I really need to be able to implement the functionality for the end user to save their final image and it's extremely annoying that the people who wrote the html5 spec purposely introduced this bug.</p>