document.querySelectorAll('a').forEach(n => ['over', 'out'].forEach(ev => n.setAttribute(`onmouse${ev}`, null)));
buttonEl.addEventListener('click', function(e) {
[
'https://s3.eu-central-1.amazonaws.com/heal.dev.public/diagnostics/files/test.json',
'https://s3.eu-central-1.amazonaws.com/heal.dev.public/diagnostics/files/test1.jpg'
].forEach(url => {
fetch(url).then(r => r.blob()).then(blob => {
const fr = new FileReader();
fr.onload = function(e) {
const a = document.createElement('a');
a.href = e.target.result;
a.download = url.split('/').pop();
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
};
fr.readAsDataURL(blob);
});
});
});
В хроме такой "клик" отлично отрабатывает.
showShelfMachine = {() => showMachine(s)}
, надо сделать showShelfMachine = {showMachine}
, а вы сделали showShelfMachine = {showMachine(s)}
.