Collision-Detection-for-EaselJS
Collision-Detection-for-EaselJS copied to clipboard
Security Exception
I got this strange error when I'm running collisions on an iPhone. I'm using images files that are in the same folder ...
SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent. in collision.js at line 156
Any idea ?
This is most likely raised by getImageData
- Can you tell in what environment your are running the app?
I know some cases from iOS5 + Phonegap, but those should not appear any more. (Unless that is your platform + environment)
For phonegap there is an access-atribute that you can set, but that'd be just speculation right now, without knowing your System/Environment information.
I encountered this error on an iPhone, using Phonegap. After several hours of research I have isolated the problem. The error occurs with SVG, but not with PNG ...
Obviously this can be reproduced on latest Chrome stable on PC
@legendtang did it occure before, or just with the latest Chrome?
Usually this is when the images are loaded from a different host, this is for security reasons. In some setups this might also appear when developing on localhost
.
I have the latest Chrome(45) installed and it works fine here, you can check this link for the live-example: http://indiegamr.com/easeljs-pixel-perfect-collision-detection-for-bitmaps-with-alpha-threshold/