Image Preloader Callback Firing Before All Images Have Loaded
Problem: I am trying to do image preloading and found this awesome solution which I have tried to adapt.I took the code and wrapped it in a function which returns a promise, but i
Solution 1:
Swap these two lines
promise.resolve();
console.log("loaded:" + url);
The promise is resolving which triggers the rest of the resolve chain. Then the log message is added.
Post a Comment for "Image Preloader Callback Firing Before All Images Have Loaded"