🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-file-download

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-file-download - npm Package Compare versions

Comparing version

to
0.3.2

15

file-download.js

@@ -6,5 +6,9 @@ var React = require('react');

if (typeof window.navigator.msSaveBlob !== 'undefined') {
// IE workaround for "HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed."
window.navigator.msSaveBlob(blob, filename);
} else {
// IE workaround for "HTML7007: One or more blob URLs were
// revoked by closing the blob for which they were created.
// These URLs will no longer resolve as the data backing
// the URL has been freed."
window.navigator.msSaveBlob(blob, filename);
}
else {
var csvURL = window.URL.createObjectURL(blob);

@@ -14,4 +18,7 @@ var tempLink = document.createElement('a');

tempLink.setAttribute('download', filename);
tempLink.setAttribute('target', '_blank');
document.body.appendChild(tempLink);
tempLink.click();
document.body.removeChild(tempLink);
}
}
}
{
"name": "react-file-download",
"version": "0.3.1",
"version": "0.3.2",
"description": "React component that trigger browser to save javascript-generated content to a file",

@@ -5,0 +5,0 @@ "main": "file-download.js",