Labs/Jetpack/Release Notes/1.6
Contents
About
The 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.6 release is mostly a stabilization release, including bug fixes and extra documentation.
Installation
Obtain the SDK in your favorite compression format:
Then unpack the archive, open the addon-sdk-1.6/README.txt file, and follow its instructions.
Major Changes Since 1.5
Documentation Upgrade
We've added a lot more tutorials and restructured the documentation, so it should be easier to find things.
Major Bug Fixes
Widget position in toolbar was lost when multiple widgets were displayed.
Right-clicking a widget displays the navigation bar context menu.
The SDK throws an exception when a content script tries to access to a cross domain or chrome object.
For example: jQuery is able to get access to a XUL DOM node when your mouse goes over scrollbars, as `event.originalTarget` refers to `xul:slider`. This slider node ends up being a chrome object, so we throw on any property access.
We shouldn't throw such an exception.
More memory leaks, this time in the widget module.
The new loader introduced regressions with Thunderbird support on Windows.
Known Issues
See the complete list of known issues and requests for enhancement. We've listed some of the issues you're most likely to encounter separately below.
In the SDK's new localization system, multiple strings in the .properties files are broken.
console.log() calls from a script included in a panel's HTML (as in this example: https://builder.addons.mozilla.org/addon/1042246/latest/) don't work: nothing is logged, either to the terminal console or the web console.
Some keyboard events are fired twice on some elements inside a panel.
Panel created with Jetpack "panel" API won't close on loss of focus if drop-down menu has focus.
Selection Context Menu Item throws error on right-click of form button.
Specified panel width ignored when Firefox is maximized.
Items of context-menu module appear only after successful page load. While the page is still loading they don't appear.
This behavior is by design because the worker for an item-window pair is created when the window finishes loading. Until a worker is created, context-menu can't tell whether the item should be shown or not, so the item isn't shown until the worker is created.
If context-menu supported contentScriptWhen like page-mod does, this could probably be done by setting it to "start". Right now consumers are effectively locked in to "ready".
Access to Full Screen API blocked from context-menu API.
passwords.search()
function "crashes" with some profiles.
If you change location in a content script using:
window.location="http://mozilla.org";
Nothing happens, instead, `location` attribute is just replaced by a string.
If a page-mod matches a page, its content scripts get attached to every iframe in the page, and this can have a bad effect on performance if the script is large and the page contains many iframes.
Although this behaviour is intentional, there should be an option to make content scripts only run on the topmost frame of a page.
When an html select element (e.g. a drop-down menu) in web content inside a panel has focus, clicking *outside* the panel does not close the panel.
If you create a context menu item for the selection type, and right-click a form button, the context menu does not appear and an error is logged. It's not yet clear whether this is specific to form buttons or not.
The tab array is not reordered to match the on-screen order of the tabs after a tab move event takes place.
The SDK automatically includes a dependency on the packages supplied with the SDK such as addon-kit
and api-utils
. This means that you can require()
modules in the SDK such as widget
without having to specify addon-kit
as a dependency.
You can also use modules from other packages, such as the packages listed here, by including a reference to the package in your package.json
file.
However, if you do add any dependencies to package.json
, then the SDK will no longer add addon-kit
or 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.
Some core JavaScript functions, such as btoa()
, are not available to add-on code. This is now being tracked in a Feature Page.
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.
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).
If you have copy of mozrunner installed on your system, the cfx test
command may not work correctly.
There is a 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 discussion group or report a bug.