-
-
Save parzibyte/f6508c26a0949c5979029028027265dd 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
// Escuchar clic del botón para descargar el canvas | |
$btnDescargar.onclick = () => { | |
const enlace = document.createElement('a'); | |
// El título | |
enlace.download = "Firma.png"; | |
// Convertir la imagen a Base64 y ponerlo en el enlace | |
enlace.href = $canvas.toDataURL(); | |
// Hacer click en él | |
enlace.click(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment