|
|
| Line 1: |
Line 1: |
| __NOTOC__
| | {{draft|}} |
|
| |
|
| == About ==
| | The 1.2 release has been replaced by the [[Labs/Jetpack/Release_Notes/1.2.1|1.2.1 release]]. The 1.2.1 release fixes [https://bugzilla.mozilla.org/show_bug.cgi?id=695788 bug 695788], which would have prevented add-ons from being distributed on https://addons.mozilla.org/en-US/firefox/. |
| | |
| Add-on SDK is a software development kit that provides a set of tools and APIs for building, testing, and packaging Firefox add-ons.
| |
| | |
| The 1.2 release is the third stable release of the SDK. It's mostly a stabilization release, and does not include many major new features. | |
| | |
| == Installation ==
| |
| | |
| Obtain the SDK in your favorite compression format:
| |
| | |
| * [https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.2.tar.gz addon-sdk-1.2.tar.gz]
| |
| * [https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.2.zip addon-sdk-1.2.zip]
| |
| | |
| Then unpack the archive, open the <tt>addon-sdk-1.2/README.txt</tt> file, and follow its instructions.
| |
| | |
| == Major Changes Since 1.1 ==
| |
| | |
| <br>
| |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=640081 Bug 640081]: Add "reload" method to tabs in the tabs module '''
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=678556 Bug 678556]: Add "name" and "version" to "self" module '''
| |
| | |
| '''[https://bugzilla.mozilla.org/show_bug.cgi?id=680821 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 [https://bugzilla.mozilla.org/show_bug.cgi?id=673331 bug 673331].
| |
| | |
| '''[https://bugzilla.mozilla.org/show_bug.cgi?id=679479 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.
| |
| | |
| == Known Issues ==
| |
| | |
| See the [https://bugzilla.mozilla.org/buglist.cgi?order=Bug%20Number&bug_status=__open__&product=Add-on%20SDK complete list of known issues and requests for enhancement]. We've listed some of the more important issues separately below.
| |
| | |
| '''[https://bugzilla.mozilla.org/show_bug.cgi?id=638742 Bug 638742]'''
| |
| | |
| 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:
| |
| | |
| <pre>
| |
| "<your add-on> could not be installed because Firefox cannot modify the needed file"
| |
| </pre>
| |
| | |
| The main fix for this will be [https://bugzilla.mozilla.org/show_bug.cgi?id=638742 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.
| |
| | |
| '''[https://bugzilla.mozilla.org/show_bug.cgi?id=663480 Bug 663480]'''
| |
| | |
| The SDK automatically includes a dependency on the packages supplied with the SDK such as [https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/packages/addon-kit/addon-kit.html <code>addon-kit</code>] and [https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/packages/api-utils/api-utils.html <code>api-utils</code>]. This means that you can <code>require()</code> modules in the SDK such as [https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/packages/addon-kit/docs/widget.html <code>widget</code>] without having to specify <code>addon-kit</code> as a dependency.
| |
| | |
| You can also use modules from other packages, such as the packages listed [https://wiki.mozilla.org/Jetpack/Modules here], by including a reference to the package in your [https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/dev-guide/addon-development/package-spec.html <code>package.json</code>] file.
| |
| | |
| However, if you do add any dependencies to <code>package.json</code>, then the SDK will no longer add <code>addon-kit</code> or <code>api-utils</code> automatically, and you must add them manually if you want to include their modules.
| |
| | |
| '''[https://bugzilla.mozilla.org/show_bug.cgi?id=663048 Bug 663048]'''
| |
| | |
| The SDK will give an error if your package name contains spaces or Unicode characters.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=627432 Bug 627432] '''
| |
| | |
| If your add-on stores data using the [https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/packages/addon-kit/docs/simple-storage.html simple-storage] API, the data is not cleaned up when your add-on is uninstalled.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=656037 Bug 656037] '''
| |
| | |
| Some core JavaScript functions, such as [https://developer.mozilla.org/en/DOM/window.btoa <code>btoa()</code>], are not available to add-on code.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=581982 Bug 581982] '''
| |
| | |
| <code>selection.text</code> returns null instead of the selected text when the selection is in a text box or text area.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=571049 Bug 571049] '''
| |
| | |
| 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.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=571843 Bug 571843] '''
| |
| | |
| <code>bin\activate</code> fails to find 64-bit Python on 64-bit Windows environments, as it assumes Python is 32-bit.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=574563 Bug 574563] '''
| |
| | |
| On Windows, <code>bin\activate</code> 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.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=660862 Bug 660862] '''
| |
| | |
| 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.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=660857 Bug 660857] '''
| |
| | |
| A widget containing HTML content gets no icon in the [http://support.mozilla.com/en-US/kb/how-do-i-customize-toolbars Customize Toolbar Window].
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=660860 Bug 660860] '''
| |
| | |
| When a user removes a widget from the toolbar its <code>detach</code> event does not get sent.
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=661884 Bug 661884] '''
| |
| | |
| Selection events for a page are not sent if the page did not fully load (for example, because the user stopped the page loading).
| |
| | |
| ''' [https://bugzilla.mozilla.org/show_bug.cgi?id=556562 Bug 556562]: mozrunner installation may break <code>cfx test</code> '''
| |
| | |
| If you have copy of mozrunner installed on your system, the <code>cfx test</code> command may not work correctly.
| |
| | |
| There is a [https://bugzilla.mozilla.org/show_bug.cgi?id=556562#c6 workaround] for this.
| |
| | |
| == Feedback and Bug Reports ==
| |
| | |
| We'd love to hear any feedback you have regarding this release! You can post it to the [http://groups.google.com/group/mozilla-labs-jetpack discussion group] or [https://bugzilla.mozilla.org/enter_bug.cgi?product=Add-on%20SDK&version=1.0b5 report a bug].
| |