canmove, Confirmed users
737
edits
(Created page with "= Note that these release notes are still DRAFT = == About == Add-on SDK is a software development kit that provides a set of tools and APIs for building, testing, and packagin...") |
|||
(21 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
== About == | == About == | ||
Line 17: | Line 18: | ||
== Major Changes == | == Major Changes == | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id= | === [https://bugzilla.mozilla.org/show_bug.cgi?id=584064 Bug 584064]: Hotkeys API === | ||
The new [https://jetpack.mozillalabs.com/sdk/1.0b5/docs/packages/addon-kit/docs/hotkeys.html hotkeys module] enables you to add hotkeys (keyboard shortcuts) to your add-on. | |||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=653187 Bug 653187]: Deprecation of global messaging primitives === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=653187 Bug 653187]: Deprecation of global messaging primitives === | ||
Line 41: | Line 42: | ||
<tr> | <tr> | ||
<td><pre> | <td><pre> | ||
on('message', function( | on('message', function(aMessage) { | ||
// | // | ||
}); | }); | ||
Line 47: | Line 48: | ||
<td><pre> | <td><pre> | ||
self.on('message', function( | self.on('message', function(aMessage) { | ||
// | // | ||
}); | }); | ||
Line 54: | Line 55: | ||
<tr> | <tr> | ||
<td><pre> | <td><pre> | ||
onMessage | onMessage = function(aMessage) { | ||
// | // | ||
} | }; | ||
</pre></td> | </pre></td> | ||
<td><pre> | <td><pre> | ||
self.on('message', function( | self.on('message', function(aMessage) { | ||
// | // | ||
}); | }); | ||
Line 69: | Line 70: | ||
The old APIs are still present for the time being, but the SDK will emit a warning if you use them. | The old APIs are still present for the time being, but the SDK will emit a warning if you use them. | ||
Note that this change ''only'' affects code running in content scripts. | |||
<br> | <br> | ||
Line 84: | Line 87: | ||
self.postMessage({ | self.postMessage({ | ||
kind: 'mouseout', | kind: 'mouseout', | ||
element: event.target.toString() | element: event.target.toString() | ||
}); | |||
worker.on('message', function(message) { | worker.on('message', function(message) { | ||
switch(message.kind) { | |||
case 'mouseover': | |||
console.log('mouseover: ' + message.element); | |||
break; | |||
case 'mouseout': | |||
console.log('mouseout: ' + message.element); | |||
break; | |||
} | } | ||
}); | }); | ||
Line 104: | Line 107: | ||
worker.port.on('mouseover', function(message) { | worker.port.on('mouseover', function(message) { | ||
console.log('mouseover :' + message); | console.log('mouseover: ' + message); | ||
}); | }); | ||
worker.port.on('mouseout', function(message) { | worker.port.on('mouseout', function(message) { | ||
console.log('mouseout :' + message); | console.log('mouseout: ' + message); | ||
}); | }); | ||
We're not deprecating the messaging style, but think the new style will work better in many situations. User-defined events are documented more fully in the [https://jetpack.mozillalabs.com/sdk/1.0b5/docs/dev-guide/addon-development/web-content.html Working with Content Scripts] guide. | We're not deprecating the old messaging style, but we think the new style will work better in many situations. User-defined events are documented more fully in the [https://jetpack.mozillalabs.com/sdk/1.0b5/docs/dev-guide/addon-development/web-content.html Working with Content Scripts] guide. | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=642447 Bug 642447]: New default value for contentScriptWhen === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=642447 Bug 642447]: New default value for contentScriptWhen === | ||
Line 122: | Line 125: | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=630962 Bug 630962]: Window-specific widgets === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=630962 Bug 630962]: Window-specific widgets === | ||
We've introduced a new object called WidgetView, which enables you to change the content of a widget on a per-window basis. You | We've introduced a new object called <code>WidgetView</code>, which enables you to change the content of a widget on a per-window basis. You access a <code>WidgetView</code> from an instance of a <code>Widget</code>, the <code>WidgetView</code> is associated with a specific window, and any changes you make to that <code>WidgetView</code> only apply to that window. | ||
WidgetView is part of the [https://jetpack.mozillalabs.com/sdk/1.0b5/docs/packages/addon-kit/docs/widget.html Widget API]. | <code>WidgetView</code> is part of the [https://jetpack.mozillalabs.com/sdk/1.0b5/docs/packages/addon-kit/docs/widget.html Widget API]. | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=627607 Bug 627607] Module resolution at build time === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=627607 Bug 627607]: Module resolution at build time === | ||
We've rewritten the linker so as to do module resolution at link time rather than build time. You shouldn't notice any difference as a result of this, but it's an essential step towards the new security model and will eventually enable add-ons to load other | We've rewritten the linker so as to do module resolution at link time rather than build time. You shouldn't notice any difference as a result of this, but it's an essential step towards the new security model, paves the way for reductions in add-on package size, and will eventually enable add-ons to load modules from other CommonJS environments. | ||
There's a good description of the change in the [https://github.com/mozilla/addon-sdk/commit/bf1d987e99c7fa8c056cf511cae0d7640af3f4c7 GitHub commit]. | There's a good description of the change in the [https://github.com/mozilla/addon-sdk/commit/bf1d987e99c7fa8c056cf511cae0d7640af3f4c7 GitHub commit]. | ||
Line 134: | Line 137: | ||
== Minor Changes == | == Minor Changes == | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=646345 Bug 646345] Add --binary-args argument to cfx === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=646345 Bug 646345]: Add --binary-args argument to cfx === | ||
This enables you to pass custom arguments to Firefox, so you can use Firefox features which need to be enabled with a command line argument, such as <code>-chromebug</code> or <code>-jsconsole</code>. | This enables you to pass custom arguments to Firefox, so you can use Firefox features which need to be enabled with a command line argument, such as <code>-chromebug</code> or <code>-jsconsole</code>. | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=646343 Bug 646343] New cfx option "--no-run" === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=646343 Bug 646343]: New cfx option "--no-run" === | ||
Rather than launching Firefox, this experimental option displays the command needed to launch the application, which can then be used to launch the application in a debugger like GDB. | Rather than launching Firefox, this experimental option displays the command needed to launch the application, which can then be used to launch the application in a debugger like GDB. | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=607601 Bug 607601] New 'detach' event for | === [https://bugzilla.mozilla.org/show_bug.cgi?id=607601 Bug 607601]: New 'detach' event for Worker objects === | ||
This new event is emitted by a <code> | This new event is emitted by a <code>Worker</code> object when its associated page is unloaded, either because the host tab is closed or because the location of the host tab changes. Its primary use is documented in the [https://jetpack.mozillalabs.com/sdk/1.0b5/docs/packages/addon-kit/docs/page-mod.html Page-Mod API] documentation. | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=614712 Bug 614712] Change directory names for add-ons: 'docs'->'doc, 'tests' -> 'test' === | === [https://bugzilla.mozilla.org/show_bug.cgi?id=614712 Bug 614712]: Change directory names for add-ons: 'docs'->'doc, 'tests' -> 'test' === | ||
To match | To match CommonJS we've changed the preferred names of the documentation and test directories for add-ons: | ||
<pre> | <pre> | ||
Line 158: | Line 161: | ||
Note that add-ons which use the old names will still work perfectly well. | Note that add-ons which use the old names will still work perfectly well. | ||
=== [https://bugzilla.mozilla.org/show_bug.cgi?id=654588 Bug 654588]: Remove cryptographic JIDs === | |||
The ID values generated for new addons are no longer based upon cryptographic signing keys; now they're just random strings starting with "jid1-". The ~/.jetpack/ directory created by earlier versions can be safely removed, and you should no longer see "cfx xpi" complain about a missing private key. | |||
== Known Issues == | == Known Issues == | ||
=== | === {{bug|647527}}: private browsing activation races tab closure === | ||
If an add-on closes a tab and then immediately activates private browsing, the private browsing activation may take effect before the tab closure is recorded in session history, causing the tab to reopen when private browsing is deactivated; alternately, the add-on script may become unresponsive. | |||
=== {{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. | |||
=== {{bug|633854}}: HTML <select> menus don't work in panels === | |||
HTML <code><select></code> menus don't work properly in panels. | |||
=== {{bug|641396}}: first Firefox tab doesn't emit "ready" event === | |||
The first Firefox tab in a window doesn't emit the "ready" event when the content in the tab is ready. | |||
=== {{bug|641396}}: tab activated by window activation doesn't emit "activate" event === | |||
A tab activated by window activation (i.e. the user switches from one window to another) doesn't emit the "activate" event. | |||
=== {{bug|652548}}: panel text color doesn't contrast with background on Mac OS X === | |||
On Mac OS X, the default color of text in panels doesn't contrast sufficiently with the panel background, making text in panels difficult to read. | |||
=== Outstanding Bugs === | === Outstanding Bugs === |