Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Does not always work event OnLoadingStateChange

Post Reply
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Does not always work event OnLoadingStateChange

Post by salvadordf »

I'm sorry but the best solution I can give is to use the TChromium.OnLoadEnd event.

The easier solution would be to define the "loading" state as the time spent by the main frame between the TChromium.OnLoadStart and TChromium.OnLoadEnd events. You can check frame.IsMain in those events.

An alternative "loading" definition would be : the time it takes to load all the frames. You can store the frame.GetIdentifier of all the frames that trigger the TChromium.OnLoadStart event and check those identifiers in the TChromium.OnLoadEnd or TChromium.OnLoadError events.
Post Reply