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?
You can use the
IOleCommandTargetand in itsIOleCommandTarget.Execmethod catch theOLECMDID_SHOWSCRIPTERRORcommand.In the following example I’ve used the interposed class so if you put this code into your unit, only those web browsers on the form or those created in this unit dynamically will get this behavior.