canvas-masking icon indicating copy to clipboard operation
canvas-masking copied to clipboard

Chrome Console Error And Mask Not Working

Open dada78 opened this issue 6 years ago • 3 comments

I downloaded the example files but the masks aren't showing when viewing in the latest Chrome (Mac). I get a console error:"Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. at HTMLImageElement.mask.onload (file:///Users/cfuller1/Downloads/canvas-masking-master/canvasmask.js:28:33"

No problem in Firefox. Any idea what the issue is? Thanks~

dada78 avatar Jan 07 '19 16:01 dada78

Yes, you can’t do that on a file:// url, it needs to be on a https:// one.

Sent from Mail for Windows 10

From: dada78 Sent: Monday, January 7, 2019 5:29 PM To: codepo8/canvas-masking Cc: Subscribed Subject: [codepo8/canvas-masking] Chrome Console Error And Mask Not Working(#9)

I downloaded the example files but the masks aren't showing when viewing in the latest Chrome (Mac). I get a console error:"Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. at HTMLImageElement.mask.onload (file:///Users/cfuller1/Downloads/canvas-masking-master/canvasmask.js:28:33" No problem in Firefox. Any idea what the issue is? Thanks~ — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

codepo8 avatar Jan 07 '19 19:01 codepo8

As you can see, the demo works: https://codepo8.github.io/canvas-masking/

Sent from Mail for Windows 10

From: dada78 Sent: Monday, January 7, 2019 5:29 PM To: codepo8/canvas-masking Cc: Subscribed Subject: [codepo8/canvas-masking] Chrome Console Error And Mask Not Working(#9)

I downloaded the example files but the masks aren't showing when viewing in the latest Chrome (Mac). I get a console error:"Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. at HTMLImageElement.mask.onload (file:///Users/cfuller1/Downloads/canvas-masking-master/canvasmask.js:28:33" No problem in Firefox. Any idea what the issue is? Thanks~ — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

codepo8 avatar Jan 07 '19 19:01 codepo8

I see. I thought it would a cross domain issue and enabled CORS on Chrome but wasn't working, but yeah works on server. Thanks!

dada78 avatar Jan 07 '19 19:01 dada78