Announcing Add-on SDK 1.13

67 views
Skip to first unread message

Jeff Griffiths

unread,
Jan 29, 2013, 7:29:46 PM1/29/13
to mozilla-la...@googlegroups.com
Rocketeers!

I’m pleased to announce that we have released SDK 1.13 today! You can
download the SDK directly in either zip or tarball format:

* https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.13.zip
* https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.13.tar.gz

As well, Add-on SDK 1.13 is now live and available for Add-on Builder users.

What’s new?

* Dave Townsend completely re-wrote the context-menu module to be much
more reliable
and less prone to memory leaks, without API or behaviour changes.
* Tab objects now have a unique id property on both Desktop and Mobile
Firefox, which
should allow users to map a tab to a content script worker more easily.
* Thanks to contributor Siavash for adding translation credits support
so that add-on
translators get the props they deserve.

You can much more detail about SDK 1.13 in the release notes:

https://wiki.mozilla.org/Labs/Jetpack/Release_Notes/1.13

Some interesting stats about this release ( from the github history
between the 1.12 & 1.13 tags ):

* 133 changes in 35 pull requests between tags 1.12 and 1.13
* Thanks to Siavash for their contribution!

cheers, Jeff

Jeff Griffiths

unread,
Jan 30, 2013, 5:16:06 PM1/30/13
to izydor....@gmail.com, mozilla-la...@googlegroups.com
Sorry, replying to the entire group. I logged this bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=836318

Dave updated the bug with an explanation on how the
feature has changed:

"This is caused by two changes that were made to the behaviour of the
context-menu module.

First items that are children of menus still support the context
property and without one they default to the PageContext. So when
context clicking on a link the Google and Wikipedia items get hidden.

Second if a menu contains no visible item it gets hidden, so the menu
gets hidden in this example."

I updated my example to now work with 1.13:

var cm = require("sdk/context-menu");
var googleItem = cm.Item({
label: "Google",
context: cm.SelectorContext("a[href]"),
data: "http://www.google.com/search?q="
});
var wikipediaItem = cm.Item({
label: "Wikipedia",
context: cm.SelectorContext("a[href]"),
data: "http://en.wikipedia.org/wiki/Special:Search?search="
});
var searchMenu = cm.Menu({
label: "Search With",
context: cm.SelectorContext("a[href]"),
contentScript: 'self.on("click", function (node, data) {' +
' var searchURL = data + node.textContent;' +
' window.location.href = searchURL;' +
'});',
items: [googleItem, wikipediaItem]
});

cheers, Jeff

On Wed, Jan 30, 2013 at 2:06 AM, <izydor....@gmail.com> wrote:
> There seems to be a problem with the context-menu module. The .Menu
> constructor is ignoring the context option - even when I set the context to
> .PageContext(). When I create a top-level menu with two items and set its
> context, the menu doesn't show up at all. However, when I put both items on
> the top-level, without the menu, the context set on them individually works
> ok for them. I thought maybe it's something with my code, but this example
> from the documentation doesn't work either:
>
> var cm = require("sdk/context-menu");
> var googleItem = cm.Item({
> label: "Google",
> data: "http://www.google.com/search?q="
> });
> var wikipediaItem = cm.Item({
> label: "Wikipedia",
> data: "http://en.wikipedia.org/wiki/Special:Search?search="
> });
> var searchMenu = cm.Menu({
> label: "Search With",
> context: cm.SelectorContext("a[href]"),
> contentScript: 'self.on("click", function (node, data) {' +
> ' var searchURL = data + node.textContent;' +
> ' window.location.href = searchURL;' +
> '});',
> items: [googleItem, wikipediaItem]
> });
>
> The same code compiled with Addon SDK 1.12 works fine.
>
> Cheers, Izek

Dave Townsend

unread,
Jan 30, 2013, 8:52:49 PM1/30/13
to mozilla-la...@googlegroups.com, izydor....@gmail.com, je...@canuckistani.ca
We're going to push out a 1.13.1 update to address this very shortly, follow along in the other thread in this group.

CIAvash

unread,
Feb 6, 2013, 10:00:10 AM2/6/13
to mozilla-la...@googlegroups.com
Wasn't bug 804935 fixed in SDK 1.13?

Bug 804935 - TypeError: window.tabs is undefined
https://bugzilla.mozilla.org/show_bug.cgi?id=804935


On 01/30/2013 03:59 AM, Jeff Griffiths wrote:
> Rocketeers!
>
> I�m pleased to announce that we have released SDK 1.13 today! You can
> download the SDK directly in either zip or tarball format:
>
> * https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.13.zip
> * https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.13.tar.gz
>
> As well, Add-on SDK 1.13 is now live and available for Add-on Builder users.
>
> What�s new?

Dave Townsend

unread,
Feb 7, 2013, 8:06:20 PM2/7/13
to mozilla-la...@googlegroups.com
And unfortunately we've come across some more context-menu regressions so we're probably going to be putting out a 1.13.2 release in the next few days. If you don't use the context-menu module then these issues shouldn't affect you.

Dave
Reply all
Reply to author
Forward
0 new messages