Hey,
Thanks for the replies.
I found the answer (ok, a answer) on stack-overflow. I have to add the
anchor to the DOM, so the code changes to this:
var anchor : Element = js.Browser.document.createElement('a');
var blob = new Blob([a.getResultAsCSV()], {type : 'text/csv'});
anchor.setAttribute("href",URL.createObjectURL(blob));
anchor.setAttribute("download",a.type+".csv");
anchor.dataset.downloadurl =
['text/csv',anchor.getAttribute("download"),anchor.getAttribute("href")].join(":");
js.Browser.document.body.appendChild(anchor);
anchor.click();
anchor.remove();
Best,
Nathan