(blob)
| 55 | } |
| 56 | |
| 57 | async function blobToDataURL(blob) { |
| 58 | return await new Promise((resolve) => { |
| 59 | var a = new FileReader(); |
| 60 | a.readAsDataURL(blob); |
| 61 | a.onload = function (e) { |
| 62 | resolve(e.target.result); |
| 63 | }; |
| 64 | a.onerror = function (e) { |
| 65 | resolve(null); |
| 66 | }; |
| 67 | }); |
| 68 | } |
| 69 | |
| 70 | async function urlToBlob(url) { |
| 71 | return await new Promise((resolve) => { |
no test coverage detected