I want to run this chrome experiment locally. I copied the .html and .js files, along with the two .jpgs that the demo uses. However, when I run it off my local drive, Chrome gives this error:
light.js:89 - Uncaught Error: 开发者_如何学GoSECURITY_ERR: DOM Exception 18
Line 89 returns the image data from the canvas after drawing the image to it. What's causing this security exception? It seems to not be Chrome-specific, as Firefox gives the same error.
Sounds like the JavaScript is making the same origin policy or local data access prevention kick in when you try to run it from your local system.
Looking at the code, it may well be trying to read a resource from your system in such a way that both browsers do not allow since the file is locally stored.
加载中,请稍侯......
精彩评论