jaws icon indicating copy to clipboard operation
jaws copied to clipboard

PixelMap 'tainted cross-origin data' in chrome 25

Open trdenton opened this issue 12 years ago • 2 comments

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

trdenton avatar Dec 27 '13 20:12 trdenton

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

ippa avatar Dec 27 '13 20:12 ippa

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

trdenton avatar Jan 03 '14 18:01 trdenton