views:

450

answers:

1

I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control.

So its off to the COM ActiveX control underneath to determine the direction of navigation. I've been looking at IHtmlWindow2 and IHtmlDocument2 and IOmHistory, but don't see anything that happens on navigation to tell me if the navigation is caused by going back, forward, a new address, or a refresh.

Since IHtmlWindow and Javascript have the same DOM, maybe someone knows how from Javascript.

I've also been looking at the IWebBrowser2 interface, but can't find anything there either.

Is there an event or property I need to inspect?

+1  A: 

Turns out it may be impossible. Because the APIs mimic the Javascript API and for security reasons JS shouldn't be able to send your browsing history across the internet, there isn't an API via COM.

Geoff Cox