Answer the question
In order to leave comments, you need to log in
How to track the loading of an image on a page?
There is a page with three canvas. By event, the script draws three images on them with the given src. Images should not be drawn at the moment the page is loaded, and in general they can change while working with the page. The page does not reload.
Problem. The script that loads pictures and draws them on the canvas "works out" before the pictures are actually loaded, respectively, emptiness is "drawn" on the canvas. When re-executing, i.e. with cached images, everything is fine.
Question. How to track that the picture is really fully loaded? Tracking the image object in the DOM does not help, the object is there, but it is underloaded.
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