The Ashes
Jetpack 0.2: slidebars, jetpack.future, and persistent storage
On the back of the first Jetpack announcement, we see new version announced, 0.2 that adds slidebars, jetpack.future, and persistent storage.
Slidebar isn’t a spelling mistake, but a slightly different take on the traditional sidebar. Check out Aza in his screencast to see them in action, and wait for the part where he sucks in a playing video and lets you continue to browse the Web elsewhere.
To code up a slidebar you simply:
-
-
jetpack.slideBar.append({
-
icon: “http://wikipedia.org/favicon.ico”,
-
url: “http://en.m.wikipedia.org/”,
-
width: 300
-
});
-
but you have to use another new feature of Jetpack 0.2…. future:
Jetpack is two things at once: it is a platform for experimentation and it is also a solid set of APIs that anyone to easily build new Firefox features. To enable Jetpack to be both stable and — at the same time — to experiment with not-quite-yet-ready features we’ve added the ability to import new features from the “future”.
Slidebars, for example, are still highly experimental. To use them, you need to import them from the future first.
Read more about future in the Jetpack enhancement proposal (JEP) for jetpack.future.
jetpack.future.import("slideBar")
Persistent Storage and Clipboard Support
One of the most requested features in the Jetpack development mailing list was for the ability to persistently store data across restarts.
We’ve added simple storage to the future module. The API is defined in the storage JEP. Using it as simple as:
jetpack.future.import("storage.simple");
var db = jetpack.storage.simple;
var data = {name: "Firefox", twitter: "@firefox"};
db.set( "friend", data );
No Comments