为什么canvas.toDataURL()会抛出一个安全异常?
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"));}SECURITY_ERR: DOM Exception 18
MYYA
慕后森