Hacker News new | ask | show | jobs
by de90 5554 days ago
Why not just do something like the below when you need to do that?

  var img = new Image();
  img.onload = function(){
       //draw to canvas
  };
  img.src = "image.png";
Could be a stupid answer, or possibly it'd be better to do it your way?( Maybe I can learn something :) )