Answer the question
In order to leave comments, you need to log in
Why is it that when the image is fully loaded, it still renders when inserted into the DOM?
So it goes.
I have a bunch of pictures that change dynamically.
Before using, I load each:
let i = 1;
function loadImage () {
let img = new Image();
img.onload = () => {
if (i === count) {
resolve();
} else {
i++;
loadImage();
}
};
img.src = path;
}
loadImage();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question