Skip to content

Instantly share code, notes, and snippets.



Created Feb 11, 2021
What would you like to do?
File downloading via Vanilla JavaScript
setTimeout(() => {
const a = document.createElement('a'); = 'file.txt';
a.href = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==';;
}, 5e3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment