trigger scripts for mozilla xpi packages

mozilla.pngff_icon.pngcamino.pngthunderbird.jpgbugzilla.jpg

I’ve been doing some development recently on the Mozilla XPCOM platform, and it’s pretty cool. However, I ran into a small snag when I tried to install an XPI package. I built. The package itself built fine, but Mozilla just ignored me when I tried to use their trigger script in a web page:

<a href="#" onclick="InstallTrigger.installChrome(
   InstallTrigger.COMPONENT, 'mypackage.xpi',
   'mypackage/1.0');">
 Install!
</a>

After some poking around, I found that if you just link to the XPI file directly, it works:

<a href="mypackage.xpi"> Install! </a>

While you’re developing, you can use the shortcut of typing the file:// link, e.g. file:///home/ryanb/mypackage.xpi, directly into the Mozilla URL box.

Happy packaging!

See also:

Post a Comment

Post a comment...

Your email is never published nor shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


  • home
    about
    pictures
    software
    index
    feed