0

I have an HTML page

<html>
<body>
    <button> This is a button! </button>
</body>
</html>

it is loaded into chromium How to catch a user's click on it and execute code?

Ron Klein
  • 9,178
  • 9
  • 55
  • 88
  • See e.g. https://stackoverflow.com/questions/50575450/tchromium-mouse-click – MartynA Oct 07 '18 at 20:58
  • You mean you want to add JavaScript to your webpage? – Ry- Oct 07 '18 at 21:32
  • I want when in TChromium you click on the button the procedure in Delphi was carried out. – Aimon Zralt Oct 08 '18 at 04:14
  • You need to add a "onclick" event to that button. The onclick event would have to call a "javascript extension" that you registered previously and that function sends a process message to Delphi. The JSExtensionWithFunction demo in CEF4Delphi has all the details. – Salvador Díaz Fau Oct 08 '18 at 12:50

0 Answers0