How do I make TWebBrowser keep running JavaScript after an error?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having some troubles with javascript error handling in WebBrowser on Delphi 2010. I'm using WebBrowser with enabled silent property. Seems OK, but there is one issue on sites with buggy scripts: it seems like part of script after error doesn't executes. Results of some script slightly differs from IE. Do you have any idea how this issue can be solved? 回答1: You can use the IOleCommandTarget and in its IOleCommandTarget.Exec method catch the OLECMDID_SHOWSCRIPTERROR command. In the following example I've used the interposed class so if you