Labs/Jetpack/API: Difference between revisions
(Origination.) |
(Added notes on jetpack.tabs) |
||
| Line 14: | Line 14: | ||
* <code>statusBar</code> lets you add or modify to Firefox's status bar at the bottom of Firefox browser windows. | * <code>statusBar</code> lets you add or modify to Firefox's status bar at the bottom of Firefox browser windows. | ||
* <code>lib</code> gives access to small libraries for the web, providing encapsulated and easy-to-use ways of accessing services like Twitter, Flickr, Delicious, and so forth. Eventually you'll be able to import libraries from anywhere, but the default ones will be code reviewed by Mozilla. | * <code>lib</code> gives access to small libraries for the web, providing encapsulated and easy-to-use ways of accessing services like Twitter, Flickr, Delicious, and so forth. Eventually you'll be able to import libraries from anywhere, but the default ones will be code reviewed by Mozilla. | ||
=== <code>jetpack.tabs</code> === | |||
<code>jetpack.tabs</code> is an Array-like object with special tab-related properties. Each element of the array is a <code>Tab</code> object. | |||
'''<code>jetpack.tabs.focused</code>''' | |||
This is the <code>Tab</code> object that corresponds to the currently focused/active tab. | |||
'''Limitations:''' At present, the <code>tabs</code> array is immutable, which means that destructive methods like <code>splice()</code> won't work on them. All other [https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/Array Array methods and properties] are available, however. | |||
Revision as of 07:50, 20 May 2009
WARNING: This reference is extremely volatile and will change.
JetPack API Reference
The jetpack Namespace
The jetpack namespace is available to all Jetpack Features, and is the main point of contact for Features with the rest of Firefox. The API is intended as a lightweight backwards-compatible facade to the underlying Mozilla platform, which means that if you write a Feature using the Jetpack library, you shouldn't have to change your code as Firefox continues to evolve.
For now, it has the following properties:
tabsprovides access to all open tabs (irrespective of window).statusBarlets you add or modify to Firefox's status bar at the bottom of Firefox browser windows.libgives access to small libraries for the web, providing encapsulated and easy-to-use ways of accessing services like Twitter, Flickr, Delicious, and so forth. Eventually you'll be able to import libraries from anywhere, but the default ones will be code reviewed by Mozilla.
jetpack.tabs
jetpack.tabs is an Array-like object with special tab-related properties. Each element of the array is a Tab object.
jetpack.tabs.focused
This is the Tab object that corresponds to the currently focused/active tab.
Limitations: At present, the tabs array is immutable, which means that destructive methods like splice() won't work on them. All other Array methods and properties are available, however.