I used in Delphi XE7 the following code to get frame source in DCEF3:
procedure TForm1.Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer);
var CefStringVisitor:ICefStringVisitor;
begin
CefStringVisitor := TCefFastStringVisitor.Create(CallbackSource); //<--Error here
frame.GetSource(CefStringVisitor);
end;
procedure TForm1.CallbackSource(const str: ustring);
begin
//Do some work
end;
I migrated my project to Delphi XE 10.1 Berlin, and now the same code does not work. The following error occurs:
Incompatible types: 'regular procedure and method pointer',
In the following code snippet:
CefStringVisitor := TCefFastStringVisitor.Create(CallbackSource)