In Firefox and Chrome this link property \"download=img.jpg\" works fine and shows the download window instead of a new tab or page.
navigator.msSaveBlob(blob, filename)
https://msdn.microsoft.com/sv-se/library/windows/apps/hh772331
Unfortunately I don't know a way to do it in Safari.