Add-on SDK is a software development kit that provides a set of tools and APIs for building, testing, and packaging Firefox add-ons.
It is the third stable release of the SDK. It's mostly a stabilization release, and does not include many major new features.
Obtain the SDK in your favorite compression format:
Then unpack the archive, open the addon-sdk-1.2.1/README.txt file, and follow its instructions.
Major Changes Since 1.1
Bug 640081: Add "reload" method to tabs in the tabs module
Bug 678556: Add "name" and "version" to "self" module
Bug 680821: Report module URLs in about:memory
This change makes the about:memory page show the memory consumed by any loaded SDK modules. Note that this feature won't actually be usable until Firefox 9, as it depends on bug 673331.
Bug 679479: Document how to communicate between content scripts and page scripts
This expands the documentation of content scripts, in particular explaining the access content scripts have to DOM objects, and how content scripts can communicate with page scripts.
See the complete list of known issues and requests for enhancement. We've listed some of the more important issues separately below.
If your add-on has a long name, and the path to your Firefox profile is long enough, then the XPI installation process will try to create an intermediate file with a name longer than the maximum supported length on some Windows systems. If that happens you may get an error like:
"<your add-on> could not be installed because Firefox cannot modify the needed file"
The main fix for this will be bug 638742, which is to stop unpacking the XPI completely. When that is done, none of the pathnames will matter: they'll all stay safely trapped inside the zipfile. At that point, the name of the XPI file and the length of the profile directory will be the only issues.
Until then, the best advice is to use shorter package names or install Firefox higher up the directory tree so the profile directory's absolute path is shorter.
The SDK automatically includes a dependency on the packages supplied with the SDK such as
api-utils. This means that you can
require() modules in the SDK such as
widget without having to specify
addon-kit as a dependency.
However, if you do add any dependencies to
package.json, then the SDK will no longer add
api-utils automatically, and you must add them manually if you want to include their modules.
The SDK will give an error if your package name contains spaces or Unicode characters.
If your add-on stores data using the simple-storage API, the data is not cleaned up when your add-on is uninstalled.
btoa(), are not available to add-on code.
selection.text returns null instead of the selected text when the selection is in a text box or text area.
If an add-on is uninstalled while it's disabled, it's not notified of uninstall. If the add-on needs to do some special cleanup on uninstall, like removing persistent storage such as a file, this won't be possible if it has been disabled.
bin\activate fails to find 64-bit Python on 64-bit Windows environments, as it assumes Python is 32-bit.
bin\activate sometimes gives the following error:
"Error: The system was unable to find the specified registry key or value"
This does not seem to affect the functioning of the SDK.
By default, widgets are placed on the add-on bar, and given a height to match the height of that bar. If the user moves the widget to a different toolbar, and that toolbar has a different height, the widget's height is not updated accordingly.
A widget containing HTML content gets no icon in the Customize Toolbar Window.
When a user removes a widget from the toolbar its
detach event does not get sent.
Selection events for a page are not sent if the page did not fully load (for example, because the user stopped the page loading).
Bug 556562: mozrunner installation may break
If you have copy of mozrunner installed on your system, the
cfx test command may not work correctly.
There is a workaround for this.