MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / trigger

Function trigger

src/utils/download.ts:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 nextDownloadSlotAt = fireAt + DOWNLOAD_STAGGER_MS;
17
18 const trigger = () => {
19 const a = document.createElement('a');
20 a.href = url;
21 a.download = filename;
22 document.body.appendChild(a);
23 a.click();
24 document.body.removeChild(a);
25 setTimeout(() => URL.revokeObjectURL(url), DOWNLOAD_REVOKE_DELAY_MS);
26 };
27
28 if (fireAt === now) trigger();
29 else setTimeout(trigger, fireAt - now);

Callers 1

downloadBlobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected