I have a WPF application that uses the WPF WebBrowser control to display interesting web pages to our developers on a flatscreen display (like a news feed).
The trouble is that I occasionally get a HTML script error that pops up a nasty IE error message asking if I would like to "stop running scripts on this page". Is there a way to suppress this error checking?
NOTE: I have disabled script debugging in IE settings already.
Best Answer
Here is a solution i just made with reflection. Solves the issue :) I run it at the Navigated event, as it seems the activeX object is not available until then.
What it does is set the .Silent property on the underlying activeX object. Which is the same as the .ScriptErrorsSuppressed property which is the Windows forms equivalent.
A better version that can be run anytime and not after the .Navigated event:
If any issues with the second sample, try swapping wb.Loaded with wb.Navigated.