| uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: http://sjs.sinajs.cn/photo/js/photo.js?5.js :: anonymous :: line 72"  data: no]Line 0last time when i try to rorate img in my file,i got this error,and after taking much time,the answer is clear,that is because when i new a img object,but the event for that img should be wait until it loaded,so for resovling it,we need to move those codes in the img.onload=triggerEvent4YOU
 
 |