WebBrowser (MSIE) - Capture JS Errors using Exec of IOleCommandTarget
问题 I need to capture script errors in MS IE activex control (dubbed as WebBrowser). As I see it, this is done by implementing the IOleCommandTarget interface in my application and listening for OLECMDID_SHOWSCRIPTERROR. I did the above and I know it works since my Exec method is called, but here's the problem; it is only called once with nCmdID being set to $00000037 ( OLECMDID_PAGEACTIONBLOCKED ), but never $00000028 ( OLECMDID_SHOWSCRIPTERROR ). In order to trigger that error, I've been using