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.

OnLoadingStateChange property

Post Reply
Pcrepair
Posts: 10
Joined: Tue Sep 27, 2022 5:09 pm

OnLoadingStateChange property

Post by Pcrepair »

Good day salvadordf

to determine if the page has finished loading, I can use

Code: Select all

procedure TMain.crmLoadingStateChange(Sender: TObject; const browser: ICefBrowser;
  isLoading, canGoBack, canGoForward: Boolean);
begin

  if isLoading then
  begin
    Label3.Caption := 'Loading...';
  end
  else
  begin
    Label3.Caption := 'Finished load';
    gFinished := True;
  end;

end;
OnLoadingStateChange is guaranteed to detect when the page is finished loading, but on some sites it takes very long time. visually the page is already loaded, manually I can work with it, but isLoading is still FALSE, so the analysis unit is idle.

If it is possible, please point out the way to correctly determine the end of page loading. maybe there is a time interval setting, somewhere in GlobalCEFApp or somewhere else.

Thank you.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: OnLoadingStateChange property

Post by salvadordf »

I just answered this question here :
https://www.briskbard.com/forum/viewtopic.php?p=8689#p8689

...it's not easy to know when a page is fully loaded.
Post Reply