1

Typically the method is to use:

    window.addEventListener('load', function() {

    });

Although this post a challenge if the plugin is loaded through ajax...since then the onload event has fired.

document.readyState is the closest thing I know to check if a page is loaded, yet this doesn't include fetched elements.

The link is for jQuery, and it doesn't include fetch.

Aero Wang
  • 8,382
  • 14
  • 63
  • 99
  • I think you need to check each fetched element separately, and have one place that checks if all of them are loaded. I don't think there is any way around this. – K. Kirsz Jul 21 '17 at 06:31
  • Possible duplicate of [How to know when all ajax calls are complete](https://stackoverflow.com/questions/287188/how-to-know-when-all-ajax-calls-are-complete) – K. Kirsz Jul 21 '17 at 06:32
  • @K.Kirsz The link is for jQuery, and it doesn't include fetch. – Aero Wang Jul 22 '17 at 13:20

0 Answers0