No nsIWebProgressListener callbacks when clicking on a "target=_blank" link?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

No nsIWebProgressListener callbacks when clicking on a "target=_blank" link?

Babele Dunnit
Hi all,

the subject says it all. I was expecting at least some activity on a
nsIWebProgressListener interface even if I do NOT implement any "new
tab/popup/new window" functionality (via nsIWindowCreator), but
nothing happens at all.

Is implementing nsIWindowCreator  (or nsIWindowCreator2, obviously)
the only way to get notifications about clicks on "target=_blank"
links??

_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding
Reply | Threaded
Open this post in threaded view
|

Re: No nsIWebProgressListener callbacks when clicking on a "target=_blank" link?

Benjamin Smedberg
On 3/5/2012 10:44 AM, Babele Dunnit wrote:
> the subject says it all. I was expecting at least some activity on a
> nsIWebProgressListener interface even if I do NOT implement any "new
> tab/popup/new window" functionality (via nsIWindowCreator), but
> nothing happens at all.
>
> Is implementing nsIWindowCreator  (or nsIWindowCreator2, obviously)
> the only way to get notifications about clicks on "target=_blank"
> links??
Web progress listeners are for a specific browsing context/docshell.
Since target=_blank opens a *new* browsing context/docshell, you would
have to make sure that you have a listener registered for whatever
creates that new window.

--BDS

_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding