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.

AfterRender Event ?

Post Reply
michal@dorfin.waw.pl
Posts: 41
Joined: Sun Feb 05, 2017 8:53 am

AfterRender Event ?

Post by michal@dorfin.waw.pl »

1.
How can I get info that page is fully rendered and ready to accept input (filling forms) ? Something like "onDocumentComplete" in TWebBrowser ?
TChromium.onLoadEnd seems to be fired earlier.

2.
Is there any possibility to get message/event when some part of the content of the page is being changed (i.e. after Ajax request that injects some data into DOM) ?
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: AfterRender Event ?

Post by salvadordf »

michal@dorfin.waw.pl wrote: Sun Jan 21, 2018 11:46 am 1.
How can I get info that page is fully rendered and ready to accept input (filling forms) ? Something like "onDocumentComplete" in TWebBrowser ?
TChromium.onLoadEnd seems to be fired earlier.
You can use the IsLoading paramenter in TChromium.OnLoadingStateChange or check frame.isMain in the TChromium.OnLoadEnd event.

Read this thread for more info :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=261
michal@dorfin.waw.pl wrote: Sun Jan 21, 2018 11:46 am 2.
Is there any possibility to get message/event when some part of the content of the page is being changed (i.e. after Ajax request that injects some data into DOM) ?
I don't recall any CEF event to detect when the dom has been altered.
You will have to use javascript and send the information back to Delphi when that happens.
Take a look at the demos in the javascript folder.
Post Reply