Thursday, March 17, 2011

SECURITY_ERR on Chrome using getImageData()

When playing a little with Canvas HTML5, I stumbled upon a Javascript exception SECURITY_ERR. After some search I found out that Chrome throws this exception if you're running it on as local file ( file:/// ) or using on a image from different domain.

If you want to disable this for a while just to make your development, you can start Chrome from command line with the switch --allow-file-access-from-files.

Example for Mac OS X:

/Applications/Google\\ Chrome --allow-file-access-from-files&

No comments: