Friday 15 April 2011

internet explorer - Get Data URL from Canvas with SVG (on the same domain) Causes Security Error -


In some tests of my Javascript application, I want to check if the canvas has been pulled properly or not. Some SVG images, which come in the form of scripts from the same domain, are dragged to the canvas.

To do this, I compare the result of toDataURL () with the same result of the image of the canvas expected.

While it works fine in Firefox, it is a security error ( Uncaught error: security error: DOM exception 18 ) and Internet Explorer ( SCRIPT5022: Security in Chromium) Error ).

Is this a way to bypass this restriction with an HTTP header, a browser option, or something else?

Only one application will be used to test, I do not care that it removes some security from the browser.

At least I will be able to do this because I had to use some hacks to make the application work, but I would be happy to execute these tests in Chrome.

Attach the following flag to bypass the same-key-policy in Chromium:

  • chrome.exe - allow -file-access-in-file

    A shortcut or command to switch between two modes Use line aliases.

    For IE, add both sites to the Trusted sites zone:



No comments:

Post a Comment