Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from
install.js based packages to the new packaging scheme with an
install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension.
Returns an object representing the version number from the Client Version Registry for the specified component. It is used in both trigger scripts and installation scripts.
InstallVersion getVersion ( String component );
getVersion method has one parameter:
- The name of a component in the Client Version Registry.
If Software Installation is disabled, this method returns
NULL. Otherwise, it returns an InstallVersion object representing the version of the component.
If the component has not been registered in the Client Version Registry or if the specified component was installed with a null version, this method returns null.
Installing a component with a
NULL version indicates that the component should always be updated when the opportunity arises.
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.