Fix download saver for Safari 10.1

Safari now finally supports the ‘download’ attribute for the anchor
tag, meaning that the download saver works properly.
print-window-tiddler
Jermolene 2017-03-29 09:21:49 +01:00
rodzic 1e106a8f3d
commit b37178dda1
1 zmienionych plików z 0 dodań i 2 usunięć

Wyświetl plik

@ -33,8 +33,6 @@ DownloadSaver.prototype.save = function(text,method,callback,options) {
}
// Set up the link
var link = document.createElement("a");
link.setAttribute("target","_blank");
link.setAttribute("rel","noopener noreferrer");
if(Blob !== undefined) {
var blob = new Blob([text], {type: "text/html"});
link.setAttribute("href", URL.createObjectURL(blob));