Created
April 10, 2018 09:43
-
-
Save ohac/3632d1914521400a698d6c504ca550df to your computer and use it in GitHub Desktop.
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
| (()=>{ | |
| var a = document.createElement('A'); | |
| a.download='foo-'+(new Date()).toISOString()+'.txt'; | |
| a.href='data:text/plain,foo'; | |
| document.body.appendChild(a); | |
| a.click(); | |
| document.body.removeChild(a); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment