开发者

Any way to prevent .NET's WebBrowser's from executing javascript?

开发者 https://www.devze.com 2023-01-11 03:09 出处:网络
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 f

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 开发者_如何学JAVAa 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消