1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

Add target=_blank exportAsFile

This commit is contained in:
Thomas 2018-04-04 16:26:05 -07:00
parent bcb5f14b06
commit 18e0a7e4f9
2 changed files with 2 additions and 0 deletions

View File

@ -231,6 +231,7 @@ function exportAsFile (filename, data) {
window.navigator.msSaveBlob(blob, filename)
} else {
const elem = window.document.createElement('a')
elem.target = "_blank"
elem.href = window.URL.createObjectURL(blob)
elem.download = filename
document.body.appendChild(elem)

View File

@ -271,6 +271,7 @@ function exportAsFile (filename, data) {
window.navigator.msSaveBlob(blob, filename)
} else {
const elem = window.document.createElement('a')
elem.target = "_blank"
elem.href = window.URL.createObjectURL(blob)
elem.download = filename
document.body.appendChild(elem)