title: HTML5 <a> Download Attribute in Javascript not Handling Server Error
body: <p>I'm trying to programmatically click an <code>&lt;a&gt;</code> element which has the download attribute and an href to download a file from a server. However if there is an error downloading, the server will return an html page with an error status code. Because of the HTML5 download attribute it tries to force download this html page or downloads a server error file. Is there a way I can have this open the html error file in a new tab instead of downloading? I am already setting the target attribute to _blank.</p>