So the original question is to be able to find different controls on a XUL
application. But to make it simpler, i want to be able to find various controls
present on the Firefox browser through my JavaScript. I am trying to use the
interfaces being exposed by XULRunner. The thing i have tried thus far.
function clicking(txt)
{
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var enumerator = wm.getEnumerator("navigator:browser");
alert("1");
while(enumerator.hasMoreElements()) {
var win = enumerator.getNext();
var loc = win.document.location;
var url = loc.pathname;
var link= loc.href;
alert("2");
alert(url);
alert(link);
win.close();
}
This code when i run on a Firefox embedded in an extension , gives me the
reference of the top level xul window which in my case is the browser. What i
am typically interested is in enumerating the different controls( forward
\backward buttons, menus..etc ) available on the FireFox Browser.
Any help ?
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform