Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in trying to capture body #42

Closed
elewinso opened this issue Jun 15, 2016 · 3 comments
Closed

error in trying to capture body #42

elewinso opened this issue Jun 15, 2016 · 3 comments

Comments

@elewinso
Copy link

I have just downloaded the library.
I am hosting it on an apache server I have installed on my machine.
I am injecting the javascript to a given via the console
var url='https://guest.supporttip.com/static/tipcms/js/dom-to-image.min.js';var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=url;head.appendChild(script);

and then I try to run the code from the readme:

var node = document.body;

domtoimage.toPng(node)
    .then(function (dataUrl) {
        var img = new Image();
        img.src = dataUrl;
        document.body.appendChild(img);
    })
    .catch(function (error) {
        console.error('oops, something went wrong!', error);
    });

I have tried this with several pages and it fails more often than not. Can someone assist?

@tsayen
Copy link
Owner

tsayen commented Aug 25, 2016

what error are you getting? can you put together a JSFiddle?

@elewinso
Copy link
Author

I sorry, this was 2 months ago already, I don't remember.
we opted for using the chrome api instead.

@tsayen
Copy link
Owner

tsayen commented Aug 25, 2016

OK, no problem :)

@tsayen tsayen closed this as completed Aug 25, 2016
muhammad-usman-anwar added a commit to muhammad-usman-anwar/dom-to-image that referenced this issue Sep 15, 2021
antoniogagos pushed a commit to antoniogagos/dom-to-image that referenced this issue Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants