I use XPCom through JavaXPCom, using the "MozillaBrowser" of project ATF. I made a success of the replacement of the service "Prompt Service" whith the "ComponentRegistrar", by implementing "nsIPromptService" and "nsIFactory". The goal to recover the parameters of "alert ()" of the Javascript web page, without creating window, is successful.
I want to make the same thing with "window.open ()". I tested by implementing "nsIWindowWatcher" and by recording the service "@ mozilla.org/embedcomp/window-watcher;1". I thought that the method "nsIDOMWindow openWindow (nsIDOMWindow relative, char* URL, char* name, char* features, nsISupports arguments)" would be call, but it is a QI on the interface "nsPIWindowWatcher" which is made. "nsPIWindowWatcher" does not have an interface for JavaXPCOM, but I created an interface to implement it. "nsIDocShellTreeItem findItemWithName (PRUnichar* name, nsIDocShellTreeItem requestor, nsIDocShellTreeItem originalRequestor)" is called, then an IQ on the interface "nsIWindowWatcher", and it is finished. I does not obtain all the parameters of the "window.open" (most important is the URL). I also tested, by preserving truths service "window-watcher", to make a "void setWindowCreator (nsIWindowCreator creator)" by implementing a "nsIWindowCreator". Much IQ is done, but nothing leads to the parameters of the "window.open". I also tested with "void registerNotification (nsIObserver observer)" of "window-watcher", but nothing is notified. I also tested with "addOpenWindowListener" of "MozillaBrowser", but I am obliged to create new MozillaBrowser. How I can make to obtain the URL (or more) "window.open", without opening a new window ? _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
