There are tons of ways to detect if a page is loaded. However I want to do this continuously and couldn't find a way that is working.
To explain what continuously mean, let me give an example. In a page,
user clicks somewhere and request a new image to be loaded. this triggers buffering of some images.
JS code automatically buffers some images continuously.
So I want to check if in the page there is no image left to be loaded (also, there is no image in the process of downloading).
[I want be able to understand if every image finished being downloaded/buffered/cached. So that I can request buffering of new images.]
I plan to do the thing in brackets infinite times while limiting number of buffered images.
Here you can sample relevant code: https://stackoverflow.com/questions/35650853/how-to-buffer-next-200-images-when-the-page-is-not-loading-anything