thanks boris, i have studied the nsIWindowProvider interface. but i'm afraid i have no change to supply my own implemention of it to the mozilla core. as i know, nsWindowWatcher will ask for the nsIWindowProvider interface from nsGlobalWindow, and nsGlobalWindow is create in nsDocShell. none of them would give me a callback when they are processing the click event. in my option, the only one thing i supply to mozilla core is the nsIWebBrowserChrome interface when i create the nsWebbrowser,but there's no any usefull callback interface for the hyperlink click event. so i want to know is there any possibility to hook the click event ? thank u very much~
"Boris Zbarsky" <[email protected]> ??????:[email protected]... > wellbye wrote: >> hi,i'd like to process the hyperlink click event myself, such as checking >> the target property and open a new window(not *chrome*,maybe IE) when >> it's "_blank" and leave it for the origin handler for else. >> i think there must be some association with the PreShell::SetLinkHandler >> and nsILinkHander, but i'm not sure when and where to create my own >> handler and set it to the PreShell? or any other solution? > > By default, nsILinkHandler is basically the docshell. You could try > setting up your own thing, but it's basically unsupported (e.g. I seem to > recall that we have code that assumes that the link handler is a > docshell). > > For target=_blank you could use a window provider, but you'd still need to > hand back a docshell, to handle <form action="post" target="_blank"> > correctly. > > -Boris _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
