antimatter15 / jsgif

Save a HTML5 Canvas to GIF and Animations. A port of as3gif GIFPlayer to JS
http://antimatter15.com/
MIT License
1.07k stars 138 forks source link

Fixes report #32

Open Palmer-JC opened 6 years ago

Palmer-JC commented 6 years ago

I have been trying to use this. I found some fixes. They are small, so just reporting for now. They can be probably updated much faster by some else, then me forking / changing / and PRing.

In GIFEncoder.js:

var click = document.createEvent('MouseEvents'); click.initEvent('click', true, false); templink.dispatchEvent(click);

bills-appworks commented 6 years ago

I faced problem of download() not work on Mozilla Firefox. I try to fix and make patch based on following article of Stackoverflow: https://stackoverflow.com/questions/32225904/programmatical-click-on-a-tag-not-working-in-firefox

My implement is templink element append under document root. It's work fine on Firefox. But @Palmer-JC 's code seems to more better. I hope to repository taking his code.