niklasvh / html2canvas-proxy

Proxies for html2canvas
http://html2canvas.hertzen.com/
32 stars 15 forks source link

html2canvas OnRender failed because of cross domain images #4

Open tariqazizchk opened 11 years ago

tariqazizchk commented 11 years ago

I want a screenshot of the current page through html2canvas. However, the code displays "here" and then stops the second alert function is not triggering

alert("here");
html2canvas(instance.element, {
    onrendered: function(canvas) {
        alert("here");
        instance.options.onPostRender(canvas)

In the firebug the following error appears:

"NetworkError: 404 Not Found - http://html2canvas.appspot.com/?url=https%3A%2F%2Fwww.otherdomain.com%2Flivezilla%2Fimage.php%3Fid%3D08&callback=html2canvas_1"
"NetworkError: 404 Not Found - http://html2canvas.appspot.com/?url=https%3A%2F%2Ffpdbs.sandbox.paypal.com%2Fdynamicimageweb%3Fcmd%3D_dynamic-image%26buttontype%3Decshortcut%26locale%3Den_US%26ordertotal%3D569.00%26pal%3D3JZ6HTBQ33JC2&callback=html2canvas_8"

I think its because the image is from another domain, but I found related issue but I think the proxy is already there now. https://github.com/niklasvh/html2canvas-proxy/issues/2