Created
November 17, 2014 09:57
-
-
Save egnedko/b4972d911e0e299d1ca7 to your computer and use it in GitHub Desktop.
Download something with JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = createElement('a'); | |
a.setAttribute('href', 'data:text/plain;base64,SGVsbG8gd29ybGQK'); // Hello Word | |
a.setAttribute('download', 'file'); | |
a.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment