1

I just don't want my WebBrowser to execute javascript at all. I don't need it for what I'm doing and causes errors. Is there any way to preventing from executing it? I tried setting the InnerHtml for all "SCRIPT" elements to an empty string but I get errors.

If I can find a way to capture all mouse events and keep the browser from getting them, that would do it. The only scripts that I really need to suppress are the ones generated by mouse interaction. Any suggestion?

2
  • 1
    Can you provide more information - such as the errors that you are getting. Commented Aug 12, 2010 at 20:24
  • 3
    FYI, the WebBrowser controls (there are at least two of them) is not part of C#. It's part of .NET. Commented Aug 12, 2010 at 20:25

1 Answer 1

1

The .NET control does not have any properties, as far as I remember, to disable Javascript. The only way to change it is through Internet Explorer security settings. I do not recommend doing that programatically.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.