MCPcopy Index your code
hub / github.com/rapi-doc/RapiDoc / downloadResource

Function downloadResource

src/utils/common-utils.js:146–156  ·  view source on GitHub ↗
(url, fileName)

Source from the content-addressed store, hash-verified

144*/
145
146export function downloadResource(url, fileName) {
147 if (url) {
148 const a = document.createElement('a');
149 document.body.appendChild(a);
150 a.style = 'display: none';
151 a.href = url;
152 a.download = fileName;
153 a.click();
154 a.remove();
155 }
156}
157
158export function viewResource(url) {
159 if (url) {

Callers 2

overviewTemplateFunction · 0.90

Calls 2

createElementMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…