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.
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 can i get HTML source using CEF4 ?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How can i get HTML source using CEF4 ?
Hi , I am a new user for using this. Can you post a sample code for me , very thanks!
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How can i get HTML source using CEF4 ?
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
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 ?
Very Thanks! Got it. Solved.