0

I have a Tumblr theme that includes a canvas script.
The Cross-Origin Resource Sharing policy doesn't allow context.getImageData() to work. Script is located at user.tumblr.com,
images are located at static.tumblr.com.

Is there any solution for this?

Thank you!

Digerkam
  • 1,826
  • 4
  • 24
  • 39

1 Answers1

0

document.domain will be your friend there.

I haven't studied the canvas security model closely, but if it follows the rest of Javascript, setting

document.domain = tumblr.com

might help.

(Googling for document.domain canvas may lead to more.)

Jeremy J Starcher
  • 23,369
  • 6
  • 54
  • 74