577
edits
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
The general syntax for importing from the future is as follows: | The general syntax for importing from the future is as follows: | ||
<pre class="brush:pre;toolbar:false;">jetpack. | <pre class="brush:pre;toolbar:false;">jetpack.future.import( stringMountPath )</pre> | ||
Where <code>stringMountPath</code> is a string that enumerates where, starting from the <code>jetpack</code> base, the feature will be mounted. To get a list of what mount paths are available, see the "Reading the Future" section below. Some examples of using <code> | Where <code>stringMountPath</code> is a string that enumerates where, starting from the <code>jetpack</code> base, the feature will be mounted. To get a list of what mount paths are available, see the "Reading the Future" section below. Some examples of using <code>future.import</code> are as folows: | ||
<pre class="brush:js;> | <pre class="brush:js;> | ||
// jetpack.storage.sqlite is currently undefined. | // jetpack.storage.sqlite is currently undefined. | ||
jetpack. | jetpack.future.import("storage.sqlite"); | ||
var mydb = jetpack.storage.sqlite.create("blah"); | var mydb = jetpack.storage.sqlite.create("blah"); | ||
// jetpack.T1000 is currently undefined | // jetpack.T1000 is currently undefined | ||
jetpack. | jetpack.future.import("T1000"); | ||
jetpack.T1000(); | jetpack.T1000(); | ||
</pre> | </pre> | ||
Line 59: | Line 59: | ||
To determine what features are importable from the future, use: | To determine what features are importable from the future, use: | ||
<pre class="brush:js;toolbar:false;">jetpack. | <pre class="brush:js;toolbar:false;">var list = jetpack.future.list()</pre> | ||
It returns an array containing the set of potential <code>stringMountPoints</code> as used in <code>jetpack.future.import()</code>. |
edits