Skip to content

PixelMap 'tainted cross-origin data' in chrome 25 #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
trdenton opened this issue Dec 27, 2013 · 2 comments
Open

PixelMap 'tainted cross-origin data' in chrome 25 #108

trdenton opened this issue Dec 27, 2013 · 2 comments

Comments

@trdenton
Copy link

Trying to use the PixelMap functionality in chrome, but it seems to have issues loading the content (something to do with it using a canvas internally to store/modify the image?). The below code works with no issues in firefox 18

code looks like so:

jaws.setup = function()
{
    [...]
    pixelmap = new jaws.PixelMap({image: "skyline.png", scale_image: 1})
    [...]
}
jaws.onload = function()
{
    [...]
    jaws.assets.add("skyline.png")
    [...]
}

stacktrace is below:

Unable to get image data from canvas because the canvas has been tainted by cross-origin data. jaws.js:677
jaws.retroScaleImage jaws.js:677
PixelMap jaws.js:2969
Example3.setup ds.js:9
GameLoop.start jaws.js:1591
jaws.switchGameState jaws.js:404
assetsLoaded jaws.js:348
processCallbacks jaws.js:1453
assetLoaded jaws.js:1400
Uncaught Error: SecurityError: DOM Exception 18 jaws.js:677
jaws.retroScaleImage jaws.js:677
PixelMap jaws.js:2969
Example3.setup ds.js:9
GameLoop.start jaws.js:1591
jaws.switchGameState jaws.js:404
assetsLoaded jaws.js:348
processCallbacks jaws.js:1453
assetLoaded jaws.js:1400
@ippa
Copy link
Owner

ippa commented Dec 27, 2013

got the full example online? is everything on the same domain?

@trdenton
Copy link
Author

trdenton commented Jan 3, 2014

It seems it was acting up while testing from my local filesystem, but works correctly when I put it online. Odd!

I doubt this is a serious issue but you can observe with http://donkeyslot.com/ds.tar.gz. Code is up at http://donkeyslot.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants