MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / triggerDownload

Function triggerDownload

Support/SingleFileLibs/javascript/app.js:420–432  ·  view source on GitHub ↗
(filename, text)

Source from the content-addressed store, hash-verified

418 }
419
420 function triggerDownload(filename, text) {
421 const blob = new Blob([text], { type: 'text/plain;charset=utf-8' });
422 const url = URL.createObjectURL(blob);
423 const a = document.createElement('a');
424 a.href = url;
425 a.download = filename;
426 document.body.appendChild(a);
427 a.click();
428 setTimeout(() => {
429 URL.revokeObjectURL(url);
430 a.remove();
431 }, 0);
432 }
433
434 async function downloadAllZip() {
435 downloadAllBtn.disabled = true;

Callers 2

renderTableRowsFunction · 0.85
downloadAllZipFunction · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected