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.

How to pass parameters to delphi function from javascript function

Post Reply
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to pass parameters to delphi function from javascript function

Post by salvadordf »

Osacar wrote: Fri Jun 09, 2017 8:21 am How to pass parameters to delphi function from javascript function?
The MiniBrowser demo has a complete example about the javascript-delphi integration.

It's explained here :
viewtopic.php?f=8&t=42

Take a look at the javascript code calling myextension.mouseover(getpath(evt.target)) (uMiniBrowser.pas, line 277)

The extension has a procedure called TTestExtension.mouseover(const data: string) which adds the data parameter to the ArgumentList

Later, that message is received at procedure TMiniBrowserFrm.Chromium1ProcessMessageReceived where the text in the ArgumentList is shown in the StatusBar.
Post Reply