Triggering automatic installs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Triggering automatic installs

Martin Husemann
I have a plugin that I used to pack with a install.js script, which
then used initInstall(..., "my/plugin/name", version) to do the install
and register the version.

With this technique, I could run script code on pages that did basically:

  var iVersion = InstallTrigger.getVersion('my/plugin/name');
  if (iVersion != null) {
    var xpiVersion = new InstallVersion;
     if (xpiVersion.compareTo(iVersion) <= 0)

This made sure the plugin is installed and is new enough for this page.

I later converted my xpi to install.rdf style. Now above code always fails,
as the install.rdf does not register the current version as 'my/plugin/name',
so in the code above iVersion is always null.

Is there some easy way to work around this?
Any install.rdf entry I'm missing that would add this version info?
Or some alternive JavaScript code to query the version of a AddOns-manager
registered plugin?


dev-tech-plugins mailing list
[hidden email]