Ashutosh Kulkarni wrote:
> Hi Jud,
>
> Thanks for replying. Let me explain what I'm trying to do here.
> I have a plugin that is used as a document editor. When someone
> clicks on the "Back" or "Forward" menus or toolbar buttons, I want
> to first throw a dialog box asking the user whether he indeed
> wishes to quit the plugin, and if the user chooses cancel to
> cancel the new page load and bring the user back to the plugin.
If the plugin and the embedding app "know" about each other, perhaps it would be
better to do it the other way around - from your embedding app, load the page,
locate the plugin via the DOM and then set the correct nsIWebBrowser pointer on it
via some custom interface it implements. This saves having to find your way up to
the top from the plugin, treading on lots of private interfaces on the way.
Adam