我使用的应用程序中的德尔福铬组件显示从Web应用程序的网页。 在这些网页上我有火选择性的Ajax调用Web服务器的按钮。 我需要以下的事情: 点击其中一个按钮时,事件宿主应用程序的通知后,我应该从这个通知想要得到的Ajax请求数据(和响应过,如果可能的话...)做他们的宿主应用程序的一些处理。 这可能吗?
解决方案扩展(的TCefv8HandlerOwn类),其实只是一个JavaScript函数,它激发TCefv8HandlerOwn.Execute(在这里您可以获取或设置参数)时,它从某个地方脚本调用。
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 ?
解决方案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.