Delphi Chromium - how get data of Ajax call when a

2019-05-25 17:38发布

问题:

I'm using Delphi Chromium component in an application to show web pages from a Web Application. In these pages I have buttons that fire selective Ajax calls to Web Server. I need the following thing: when one of these buttons is clicked, after notification of event to 'host application' I should want from this notification to get data of Ajax request (and response too, if possible...) to do some processing on them from 'host application'. Is it possible ?

回答1:

The extension (the TCefv8HandlerOwn class) is in fact just a JavaScript function which fires the TCefv8HandlerOwn.Execute (where you can get or set its parameters) when it's called from somewhere in the script.