Skip to content

Instantly share code, notes, and snippets.

@glaucia86
Created March 1, 2017 18:11
Show Gist options
  • Save glaucia86/000193ad507c8229cff69c03d7b2eb57 to your computer and use it in GitHub Desktop.
Save glaucia86/000193ad507c8229cff69c03d7b2eb57 to your computer and use it in GitHub Desktop.
script
function tirarFoto(){
//...
// Retornará a image através do dataURL para o canvas:
var imageDataURL = esconder_canvas.toDataURL('image/png');
// Define o atributo href do botão de download.
document.querySelector('#dl-btn').href = imageDataURL;
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment