-
@edent 1) Create
<a download="b.html">programmatically. 2) Set itshrefattribute to a data URL representation of theouterHTMLof#b. 3) Programmaticallyclickthe link. 4) Profit.
<a download="b.html"> programmatically.
2) Set its href attribute to a data URL representation of the outerHTML of #b.
3) Programmatically click the link.
4) Profit.