Labs/Jetpack/Reboot/JEP/3: Difference between revisions

From MozillaWiki
< Labs‎ | Jetpack‎ | Reboot‎ | JEP
Jump to navigation Jump to search
(first version of new panels JEP)
m (redirecting old to new)
 
Line 1: Line 1:
= JEP 3 - Panels =
#Redirect [[Labs/Jetpack/Reboot/JEP/103]]
 
* '''Type''': API
* '''Status''': Accepted/Pre-production
* '''Champion''': Myk Melez <[mailto:myk@mozilla.org myk@mozilla.org]>
* '''Bug''': {{bug|494238}}
 
= Summary =
 
Jetpack should have an API that enables features to create rich content panels that float above the browser window.  An example of this kind of functionality is shown in the popular add-on TwitterFox:
 
http://img.skitch.com/20090821-rbhrm8ddj2xk6f88uy66gdf97h.jpg
 
= jetpack.panel =
 
The API access point is <code>jetpack.panel</code>, a function that constructs and returns a new Panel object.
 
var panel = jetpack.panel({ ... });
 
The function accepts a single parameter, a collection of named values specifying panel options, which are:
 
; content: the URL to load in the panel, or a string of HTML to display in it
; width: the width of the panel as a CSS numeric value; default value 400px
; height: the height of the panel as a CSS numeric value; default value 300px
 
= Panel =
 
Panel methods are:
 
; show: show the panel to the user.
; hide: hide the panel from the user.
 
Panel properties are:
 
; document: the DOM document for the content in the panel

Latest revision as of 21:07, 2 February 2010