Page 1 of 1

Re: How can i get HTML source using CEF4 ?

Posted: Wed Mar 22, 2017 11:02 am
by salvadordf
It's all in the MiniBrowser demo.

To get the HTML source you just have to call TChromium.RetrieveHTML and then wait for the TChromium.OnTextResultAvailable event. You'll have the HTML code in the aText parameter of that event.

Re: How can i get HTML source using CEF4 ?

Posted: Thu Sep 09, 2021 11:25 am
by alexhsieh
Hi , I am a new user for using this. Can you post a sample code for me , very thanks!

Re: How can i get HTML source using CEF4 ?

Posted: Thu Sep 09, 2021 12:22 pm
by salvadordf
Hi,

The code is in the MiniBrowser demo.

Here is the call to TChromium.RetrieveHTML :
https://github.com/salvadordf/CEF4Delphi/blob/master/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1426

And here you get the HTML source in the "aText" parameter of the TChromium.OnTextResultAvailable event :
https://github.com/salvadordf/CEF4Delphi/blob/master/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1002

Read this document for more information about CEF4Delphi :
https://www.briskbard.com/index.php?lang=en&pageid=cef

Re: How can i get HTML source using CEF4 ?

Posted: Sat Sep 11, 2021 6:33 am
by alexhsieh
Very Thanks! Got it. Solved.