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.
var
html:string;
procedure StringVisitor(const source: ustring);
begin
html:=source;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
html:='';
repeat
chromium1.Browser.MainFrame.GetSourceProc(StringVisitor);
until
html>'0';
memo1.lines.add(html);
end;
Call TChromiumCore.RetrieveHTML and get the HTML code in the TChromiumCore.OnTextResultAvailable event.
The MiniBrowser demo has an example of this functionality here :
https://github.com/salvadordf/CEF4Delphi/blob/b981543f6359c7aff3df451f5aac39f04fd96746/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1646
https://github.com/salvadordf/CEF4Delphi/blob/b981543f6359c7aff3df451f5aac39f04fd96746/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1190
Call TChromiumCore.RetrieveHTML and get the HTML code in the TChromiumCore.OnTextResultAvailable event.
The MiniBrowser demo has an example of this functionality here :
https://github.com/salvadordf/CEF4Delphi/blob/b981543f6359c7aff3df451f5aac39f04fd96746/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1646
https://github.com/salvadordf/CEF4Delphi/blob/b981543f6359c7aff3df451f5aac39f04fd96746/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1190
Thanks while writing a topic already figured out )))
This is working :