Javascript download not working in Firefox and IE
<p>I am downloading the image. It is only working in Chrome not in Firefox or IE.</p>

<pre><code>        var a = document.createElement('a');
        a.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
        a.download = 'Post-ITIE.jpg';
        a.click()
</code></pre>

<p>Can anyone help me how can it be working for all browsers.</p>

<p><a href="http://jsfiddle.net/sodofkcs/52/" rel="nofollow">JsFiddle example</a></p>

<p>Help would be highly appreciated. Thanks</p>