This commit is contained in:
Maciej Caderek
2022-01-13 06:00:00 +01:00
commit f3069d6dd1
48 changed files with 2220 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
const loadImage = (url: string): Promise<HTMLImageElement> => {
return new Promise((resolve) => {
const img = new Image();
img.addEventListener("load", () => resolve(img), { once: true });
img.src = url;
});
};
export default loadImage;