Function: downloadFile()
downloadFile(
filename,content,mime):void
Download content as filename. mime should include the charset for text
formats (e.g. "text/csv;charset=utf-8") so the file opens correctly.
The anchor is attached to the document before clicking because Firefox ignores a click on a detached element, and the object URL is revoked on a delay so the download has started before the blob is released.
Parameters
Section titled “Parameters”filename
Section titled “filename”string
content
Section titled “content”BlobPart
string
Returns
Section titled “Returns”void