Sub btn_Click (event As BANanoEvent)
Dim theStr As String = $"this is a test
with two lines"$
SaveAs("alain.txt", "text/plain", theStr)
End Sub
public Sub SaveAs(fileName As String, contentType As String, content As Object)
Dim document As BANanoObject
Dim link As BANanoObject
Dim blob As BANanoObject
document.Initialize("document")
link = document.RunMethod("createElement", "a")
blob.Initialize2("Blob", Array(Array(content), CreateMap("type": contentType)))
link.SetField("href", BANano.createObjectURL(blob))
link.SetField("download", fileName)
link.RunMethod("click", Null)
BANano.revokeObjectURL(link.GetField("href"))...