The getFileIcon()
function of the downloads
API retrieves an icon for the specified download.
For new downloads, file icons are available after the downloads.onCreated
event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete.
Icon retrieval is done by querying the underlying platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme.
This is an asynchronous function that returns a Promise
.