There is a guiclient demo as official source code . See the main.pas file.
The following is the class extension code:
class function TTestExtension.hello: string;
begin
Result := 'Hello from Delphi';
end;
:
TCefRTTIExtension.Register('app', TTestExtension);
HTML-:
<script>
alert ( app.hello() );
</script>
:
crm.Browser.MainFrame.ExecuteJavaScript('alert ( app.hello() );', 'about:blank', 0);