Skip to content

Instantly share code, notes, and snippets.

@joselcvarela
Created January 13, 2019 07:53
Show Gist options
  • Save joselcvarela/b5c371fc04cee02723aa7ac455a3fd28 to your computer and use it in GitHub Desktop.
Save joselcvarela/b5c371fc04cee02723aa7ac455a3fd28 to your computer and use it in GitHub Desktop.
Download html element from console
(function(){
var blob=new Blob([$0.outerHTML]);
var link=document.createElement('a');
link.href=window.URL.createObjectURL(blob);
link.download="myFileName.txt";
link.click();
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment