Get HTML Source from Chromium Embedded
12,196
in dcef 3
procedure StringVisitor(const str: ustring);
begin
//str is the SourceHtml
showmessage(str);
end;
function GetSourceHTML: string;
var
CefStringVisitor:ICefStringVisitor;
begin
CefStringVisitor := TCefFastStringVisitor.Create(StringVisitor);
Chromium1.Browser.MainFrame.GetSource(CefStringVisitor);
end;
Author by
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
How to do this with Delphi Chromium Embedded Component i know how to do this with TWebBrowser. But since no docs are present for this I am sure someone else had same problem.
Thanks
-
Stéphane B. about 9 yearsWarning : StringVisitor procedure is called asynchronously
-
delphirules over 8 years@STBLand In this case it seems the page is reloaded. How to get the source without reloading the page ?