Hello,
When I'm trying to load a website (e.g.: youtube.com) I can see, that TChromium.OnLoadEnd() is called 4 times. On other websites - it may be called less or more times.
Is there a callback or property or any tool that indicates that page is completely loaded?
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.
How to track when page is completely loaded?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to track when page is completely loaded?
This is what the code comments found in the file /include/capi/cef_load_handler_capi.h say about that event :
Some web pages have several frames and you should call frame.IsMain to know if that event corresponds to the page and not to a frame included in that page.
Code: Select all
///
// Called when the browser is done loading a frame. The |frame| value will
// never be NULL -- call the is_main() function to check if this frame is the
// main frame. Multiple frames may be loading at the same time. Sub-frames may
// start or continue loading after the main frame load has ended. This
// function will not be called for same page navigations (fragments, history
// state, etc.) or for navigations that fail or are canceled before commit.
// For notification of overall browser load status use OnLoadingStateChange
// instead.
///
Re: How to track when page is completely loaded?
Works! Thank you!