Enabling Experimental Jetpack Features

Note: This page documents the Jetpack Prototype, which isĀ  no longer under active development. Read the experiment report for what we learned from it and the blog post announcing the first SDK release for what we're up to next!

The proposed method for accessing Jetpack features that are still in development and may be added in the future is inspired by python's future module. In Python, you can call

from __future__ import foo

which adds the functionality that foo yields to the script. In Jetpack, we propse adding a new function to the base namespace called importFromFuture.

Methods

import(stringMountPath string)Imports the requested experimental feature into the script.
stringMountPathString that enumerates where, starting from the jetpack base, the feature will be mounted. To get a list of mount paths that are available, see the method below. string

Here is an example of how to import a feature (the clipboard) from the future.

jetpack.future.import("clipboard");

The goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).

list() arrayReturns an array of the set of potential stringMountPath as used in jetpack.future.import().

This is an example of how to get this array. A quick way of displaying the list is to write it to the console.log.

var list = jetpack.future.list();
console.log(list);

Open the firebug console to view.

Document Tags and Contributors

 Contributors to this page: Sheppy, MykMelez, JetpackBot
 Last updated by: Sheppy,