title: Native javascript equivalent to jQuery .attr(...).load()?
body: <p>What would be the native javascript equivalent to the jquery below?</p>
  
  <pre><code>("&lt;img/&gt;").attr("src", "data:image/gif;base64," + base64).load(function() {
    context.scale(width/this.width,  height/this.height);
    context.drawImage(this, 0, 0); 
    deferred.resolve($("&lt;img/&gt;").attr("src", canvas.toDataURL()));               
  });
  </code></pre>