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

.toBlob not woking with safari. #70

Closed
sufianasif opened this issue Sep 29, 2016 · 2 comments
Closed

.toBlob not woking with safari. #70

sufianasif opened this issue Sep 29, 2016 · 2 comments

Comments

@sufianasif
Copy link

This is he function i am using

function getImage(){
alert("sadkfjasldfkjasldkfj");
var node = document.getElementById('id-container');

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);
});

domtoimage.toBlob(node)
.then(function (blob) {
window.saveAs(blob, 'id-front.png');
});
}

Everything is working really great but the only problem is . toBlob function is not working with safari but working with chrome. Any possible Solution?
Thanks

@tsayen
Copy link
Owner

tsayen commented Sep 29, 2016

Sorry, I don't have any solution for Safary, as I cannot test on Safary. If
you have a fix that works for you on Safary, feel free to make a pull
request. Next time, please, use the issue template.

On Sep 29, 2016 22:28, "sufianasif" notifications@github.com wrote:

This is he function i am using

function getImage(){
alert("sadkfjasldfkjasldkfj");
var node = document.getElementById('id-container');

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);
});

domtoimage.toBlob(node)
.then(function (blob) {
window.saveAs(blob, 'id-front.png');
});
}

Everything is working really great but the only problem is . toBlob
function is not working with safari but working with chrome. Any possible
Solution?
Thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#70, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABpydMQO8BP68UmNdDwfAoql5GXEsHq4ks5qvBFIgaJpZM4KKYbk
.

@induguptha
Copy link

Hi sayen, I am using domtoimg.toPng() to capture a div with same domain images and text below it and then post to yammer. Everything works fine in chrome but not in safari. I am able to capture the text below the image but not the image in same domain in safari..
is there any taint property that i need to use to get image in safari?

Could you please help me with this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants