I have some links like this:
<a class="download-link" href="/some/file.mp3" download="file.mp3">download></a>
// this shows no error, but the file is not actually downloaded
for (let link of document.querySelectorAll('a[download]')) link.click();
Chrome then prompts me if I want to download multiple files, and it works.
Though you may want to warn users before doing this, as it makes the browser somewhat sluggish.