Thanks Jason - that worked perfectly.
nsURIContentListener::OnStartURIOpen()
You can modify the URI (I believe), or simply tell mozilla that you are
handling it yourself (and thus mozilla will abort the load).
Personally, I am using it to filter certain query strings from the URL
to know whether to launch the link in an external browser rather than
the embedded one. Ideally, I could just watch for "target=_blank" or
"target=_new", but I could never find a choke point where I could detect
this and also stop the load from happening outright.
On May 11, 2006, at 10:32 AM, Callum Prentice wrote:
I'm using an embedded instance Gecko for some of my application UI and
sometimes want to do things in C++ land when an HTML link is clicked.
I can catch the click via observers and the HandleEvent() method and
get the relevant attributes from the anchor tag but after doing so I
want to stop the navigation to the page.
I could do it by using my own attribute and an empty HREF but I'd like
the same page to work in the app and a web browser (where the link
goes off to a page that indirectly handles everything).
Everything I've tried hasn't worked - any suggestions?
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding