Hi,
I'm trying to figure out how to determine the version of an installed
extension in both Firefox and Mozilla. It appears that I can retrieve the
version in Firefox via:
try
{
var cExtMan =
Components.classes["@mozilla.org/extensions/manager;1"].getService(Component
s.interfaces.nsIExtensionManager);
// try to grab our info
// ID is a constant with my extension's guid
var item =
cExtMan.getItemList(ID,Components.interfaces.nsIUpdateItem.TYPE_EXTENSION,
{});
if(item && item[0])
return item[0].version;
else
return 0;
}
catch(e)
{
return -1;
}
but, this seems to fail in Mozilla.
I've also tried:
InstallTrigger.getVersion("/mozilla/yahootoolbar");
but this does not seem to reliably report the version installed and in use.
What's the right way for me to do this?
thanks
dave
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom