Created
May 30, 2018 14:47
-
-
Save bnjm/d058e3490e0f6968a191ca6ed202c705 to your computer and use it in GitHub Desktop.
This file contains 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
(async()=>{ | |
let blob = await new Promise(resolve=>document.querySelector('canvas').toBlob(resolve)) | |
let url = URL.createObjectURL(blob) | |
window.open(url) | |
let a = document.createElement('a') | |
a.href = url | |
a.download = '' | |
a.click() | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment