I want to create an HTML page content with JS, e.g.:
var html = '<html>';
html += '<head><title>Page title</title></head>';
html += '<body>...</body>';
html += '</html>';
then enable a user to download this as an HTML page somehow. I am quite sure JS will not let me prompt to download it, but maybe there is a way to open it in a separate tab as an HTML page so they could right click and save it?