did i not get enough sleep or what?? This throws Error: SECURITY_ERR: DOM Exception 18
and here's my js code... There's no way this shouldn't work!!!
var frame=document.getElementById("viewer");
frame.width=100;
frame.height=100;
var ctx=frame.getContext("2d");
var img=new Image();
img.src="http://www.ansearch.com/images/interface/item/small/image.png"
img.onload=function() {
//draw image
ctx.drawImage(img, 0, 0)
//here's where the error happens:
window.open(frame.toDataURL("image/png"));
}
can anyone explain this, please?