0

I'm using rasterizeHTML.js to create a canvas representing DOM elements of the webpage (such as a screenshot of the page), and then I'm passing it to texImage2d, in order to use this canvas as a texture. Althought it works fine in Firefox 21.0, in others browser (Chrome, Safari..) I get the following error:

SECURITY_ERR: DOM Exception 18: An attempt was made to break through 
the security policy of the user agent.

Is there a way to bypass the security policy? I want to use it locally. I tried also to use a local webserver (MAMP) because I thought it could by due to the same origin policy but the error is the same... Thanks a lot!

Jennifer Vandoni
  • 687
  • 1
  • 6
  • 8

1 Answers1

0

The local web server is needed, but have you also made sure that all of the images you are loading are from that server, not from other origins? Use the browser's web inspector to make sure you are not loading any resources from other domains.

Kevin Reid
  • 37,492
  • 13
  • 80
  • 108