Add-on SDK 1.0b5 release candidate 1 now available!

12 views
Skip to first unread message

Myk Melez

unread,
Apr 30, 2011, 12:49:34 AM4/30/11
to mozilla-la...@googlegroups.com
Rocketeers!

We've just released the first release candidate for Add-on SDK 1.0b5! Download it as a tarball or ZIP archive via the following links:

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

The candidate was built from the 1.0b5rc1 tag.

Try out the candidate, and report any problems you discover via a bug report or by posting to this discussion group. And if you think the problem should block the release, add a comment to the release tracking bug 653186!

Cheers,
-myk

Barbara & Greg Kochaniak

unread,
Apr 30, 2011, 1:02:13 PM4/30/11
to mozilla-labs-jetpack
Hi Myk,
I submitted one but (https://bugzilla.mozilla.org/show_bug.cgi?id=653917), which at least in my opinion takes away a feature that was there before. I managed to find another way of doing the same with windows-utils module instead, I hope that will remain in future releases. Question, why is the 1.05b rc1 release outputs messages like this to console every 5 seconds?

(elapsed time: 20 seconds)
(elapsed time: 25 seconds)
(elapsed time: 30 seconds)

Greg

--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.

Wes Kocher

unread,
Apr 30, 2011, 1:14:55 PM4/30/11
to mozilla-la...@googlegroups.com
On Sat, Apr 30, 2011 at 12:02 PM, Barbara & Greg Kochaniak <b...@kochaniak.com> wrote:
Question, why is the 1.05b rc1 release outputs messages like this to console every 5 seconds?

(elapsed time: 20 seconds)
(elapsed time: 25 seconds)
(elapsed time: 30 seconds)

Because this hasn't landed yet: https://bugzilla.mozilla.org/show_bug.cgi?id=653891

David Illsley

unread,
May 2, 2011, 5:01:07 AM5/2/11
to mozilla-la...@googlegroups.com
I'm getting the following warning: "The global `onMessage` function
in content scripts is deprecated in favor of the `self.on()` function.
Replace `onMessage = function (data){}` definitions with calls to
`self.on('message', function (data){})`."

While I can guess at the reasoning for the change, I'm unconvinced by
the name of the new global 'self'. 'self' is already an add-on side
module*, so having a different object on the contentScript side with
the same name will be confusing to people coming to this fresh.
Additionally, this new 'global' isn't mentioned int the 'Globals'
section of the docs.

David

* Hidden away in the 'internals' section of the API and docs, but is
critical to most uses of content scripts...

Alexandre poirot

unread,
May 2, 2011, 9:25:08 AM5/2/11
to mozilla-la...@googlegroups.com
This `self` comes from web workers. Initialy, jetpack content scripts had almost same API than web workers:
  http://answers.oreilly.com/topic/1358-introducing-the-web-workers-api/
We are shipping in 1.0b5 release a new way to communicate with the addon.
`postMessage` pattern is really limited and often lead to built on all addons a big switch/case block
that receive all events and dispatch them manually.
So we are now suggesting to use EventEmitter api with `on`and `emit`methods.
And instead of adding new stuff in content script globals, we decided to move (almost) everything in the unique `self` global.

Here is for the history around these changes.
Now I think that your comment make sense. We are now far from the web worker API and it doesn't really justify to stick with this name. I'd ideally name this global `addon` in order to have : addon.on() or addon.emit(), but such change need some more discussion and thoughts.
Then about the miss of `self` in `globals` documentation: we do not talk about it as this part of the document is for commonjs modules globals. Content scripts are not such modules. Now, in 1.0b5, they only have this `self` and `console` additional global.


2011/5/2 David Illsley <davidi...@gmail.com>

Myk Melez

unread,
May 7, 2011, 6:49:02 AM5/7/11
to mozilla-la...@googlegroups.com, Alexandre poirot, William Bamberg
On 05/02/2011 06:25 AM, Alexandre poirot wrote:
> Now I think that your comment make sense. We are now far from the web
> worker API and it doesn't really justify to stick with this name. I'd
> ideally name this global `addon` in order to have : addon.on() or
> addon.emit(), but such change need some more discussion and thoughts.
I agree, `self` isn't great, but `addon` is problematic, too, since
content scripts can be hooked up to a variety of objects (Widget, Panel,
PageMod, etc.) in different scripts (a "main" script, a module in an
addon, a module in the SDK), which are not well-described by `addon`.

At this stage of the game, `self` is pretty set in stone, so the trick
is to document it well.


> Then about the miss of `self` in `globals` documentation: we do not
> talk about it as this part of the document is for commonjs modules
> globals. Content scripts are not such modules. Now, in 1.0b5, they
> only have this `self` and `console` additional global.

It sounds like we should talk about content script globals in our
`globals` documentation.

-myk

Reply all
Reply to author
Forward
0 new messages