(url, fileName)
| 144 | */ |
| 145 | |
| 146 | export 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 | |
| 158 | export function viewResource(url) { |
| 159 | if (url) { |
no test coverage detected
searching dependent graphs…