WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
File with a test download
download-blob.html (text/html), 867 bytes, created by
Henning Stummer
on 2020-04-30 07:38:13 PDT
(
hide
)
Description:
File with a test download
Filename:
MIME Type:
Creator:
Henning Stummer
Created:
2020-04-30 07:38:13 PDT
Size:
867 bytes
patch
obsolete
><html> ><head> > <title>Download Blob</title> > <script> > function doDownload(withTimer) { > var url = window.URL.createObjectURL(new Blob(["Name ,Email"], { type: 'application/csv' })); > var downloadLink = document.createElement('a'); > downloadLink.href = url; > downloadLink.download = "demo.csv"; > document.body.appendChild(downloadLink); > downloadLink.click(); > > if (withTimer === true) { > setTimeout(function() { > window.URL.revokeObjectURL(url); > document.body.removeChild(downloadLink); > }, 100); > } > else { > window.URL.revokeObjectURL(url); > document.body.removeChild(downloadLink); > } > } ></script> ></head> ><body> > <p><input type="button" value="Download" onClick="doDownload(false)" /></p> > <p><input type="button" value="Download with Timer" onClick="doDownload(true)" /></p> ></body> ></html>
<html> <head> <title>Download Blob</title> <script> function doDownload(withTimer) { var url = window.URL.createObjectURL(new Blob(["Name ,Email"], { type: 'application/csv' })); var downloadLink = document.createElement('a'); downloadLink.href = url; downloadLink.download = "demo.csv"; document.body.appendChild(downloadLink); downloadLink.click(); if (withTimer === true) { setTimeout(function() { window.URL.revokeObjectURL(url); document.body.removeChild(downloadLink); }, 100); } else { window.URL.revokeObjectURL(url); document.body.removeChild(downloadLink); } } </script> </head> <body> <p><input type="button" value="Download" onClick="doDownload(false)" /></p> <p><input type="button" value="Download with Timer" onClick="doDownload(true)" /></p> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 211234
: 398053