Page source code does not work correctly
Posted: Wed Mar 16, 2022 5:01 pm
Hello, why the source code of the page shows the previous and not the next result ?
If you write a loop in the end it works:
Code: Select all
procedure StringVisitor(const source: ustring);
begin
memo1.lines.add(source);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
chrom.Browser.MainFrame.GetSourceProc(StringVisitor);
end;
If you write a loop in the end it works:
Code: Select all
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;