zhaosw wrote:
In an XULRunner application, I want to check all URLs before their open
so that I can redirect some URLs to a specified server. I am not sure
if the "onStartURIOpen" method of nsIURIContentListener can be used to
do that.

It cannot.

What you want has been proposed as functionality for nsIURIContentListener2, for what it's worth.

var uriLoader =
Components.classes["@mozilla.org/uriloader;1"].getService(Components.interfaces.nsIURILoader);
uriLoader.registerContentListener(uriListener);

This registers a content listener to be tried if all attempts to dispatch content to existing windows fail.

If you're trying to override behavior for a particular window, you want to set your listener as the parent of the listener for that window.

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

Reply via email to