Here is a tested sample from that link working in NSB…
var data = [["name1", "city1", "some other info"], ["name2", "city2", "more info"]];
var csvContent = "data:text/csv;charset=utf-8,";
dataString = infoArray.join(",");
csvContent += index < data.length ? dataString+ "\n" : dataString;
var encodedUri = encodeURI(csvContent);
…Instant download in chrome (desktop) when you click the button. (Does nothing in a phone tho’).
Update: This limits to 2097152 bytes (2^21) of encoded length. Larger gives “network error”.