Read this forum thread :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=261
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.
Does not always work event OnLoadingStateChange
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Does not always work event OnLoadingStateChange
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.
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.