Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js run html in blob

var val = "<div>abc</div>";

var file = new Blob([val], {
  type: "text/html"
});
// file object reference
var download = URL.createObjectURL(file);

var a = document.createElement("a");
a.href = download;
a.download = "file-" + new Date().getTime();
document.body.appendChild(a);
a.click()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #run #html #blob
ADD COMMENT
Topic
Name
2+2 =