Read Create a Text File in Memory Then Download It on Button Click With Vanilla JS, used this in PR Add button for downloading svg on web page.