« Happy Anniversary? | Main | High Score »

Thursday, September 07, 2006

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

FeedDemon rocks, Nick - and so do you.

hmm, that's interesting. I knew it was possible to interact with the DOM of a webbrowser control, but I didn't realise you could receive events from it with scripting disabled.

very cool! :D

Hey Nick,

IE7's feed view is implemented basically just as you describe. We're working on a post on how we built it that may help out, but if you encounter any problems in your own implementation, just send me a mail.

Sean

Hi Nick,

First of all, thank you for sharing this information.

Did you try DLCTL_NO_SCRIPTS in combination with BeforeNavigate2 to turn scripting on and off depending on the page watched?

I tried to disable scripting in the AxWebBrowser control a long time ago, but found that it would only check that setting when the control is first created. The link you specified also states that this is only checked "when the WebBrowser Control is instantiated".

Do you know of a way around this?

Luke, I was able to get this working by adding a custom property ("DisableUnsafeContent") to a WebBrowser descendant, and when this property was changed, I used IOleControl.OnAmbientPropertyChange(DISPID_AMBIENT_DLCONTROL) to force the WebBrowser's Invoke event to fire (which updates the script setting).

I know you're using C#, but here's a snippet of my Delphi code in case it helps:

http://www.bradsoft.com/typepad/attach/delphi-wb-snippet.txt

I should add that I've only tested this with IE7 RC1, so I can't guarantee this will work with IE6.

Nick: I used to be a Delphi developer in a previous life so I should be able to figure it out - thanks!

The comments to this entry are closed.