Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Program ID

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

The Program ID is a unique identifier for your add-on. When you package your add-on for distribution using jpm xpi, it will become the ID field in the add-on's Install Manifest.

The ID is used for a variety of purposes. For example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.

When you create an XPI with jpm xpi:

  • if the package.json does not include an id field, then the ID written into the install.rdf is the value of the name field prepended with "@".
  • if the package.json does include an id field, and it contains "@", then this is written into the install.rdf as the add-on ID.
  • if the package.json does include an id field, and it does not contain "@", then jpm xpi raises an error and the XPI will not be built.

文档标签和贡献者

 此页面的贡献者: wbamberg, didoarellano, evold
 最后编辑者: wbamberg,