Labs/Jetpack/JEP/23: Difference between revisions
Jump to navigation
Jump to search
| Line 26: | Line 26: | ||
Most of the action occurs in <code>jetpack.panel.open(...)</code>, which returns a Panel object, which can then be manipulated. We'll return to the <code>open</code> method shortly. | Most of the action occurs in <code>jetpack.panel.open(...)</code>, which returns a Panel object, which can then be manipulated. We'll return to the <code>open</code> method shortly. | ||
===== Opening a Panel ===== | |||
===== The Panel Object ===== | ===== The Panel Object ===== | ||
Revision as of 23:25, 21 August 2009
JEP 10 - Panels
- Champion: Aza Raskin <aza at mozilla dot com>
- Status: Implementing
- Type: API Track
- Created: 21 Aug 2009
- Reference Implementation: None
- Relevant Bugs:
- JEP Index
Introduction and Rationale
This JEP describes the API for creating style-able rich content panels (windows) that float above the browser window.
An example of this kind of functionality is shown in the popular add-on, TwitterFox:
Proposal
Clipboard access will live at jetpack.panel.
Panel overview
Most of the action occurs in jetpack.panel.open(...), which returns a Panel object, which can then be manipulated. We'll return to the open method shortly.
Opening a Panel
The Panel Object
The Panel type is returned by a call to jetpack.panel.open(...). Once you have a Panel object, you can manipulate that panel in numerous ways.
Inherited
- All of the properties of the window object currently used by Firefox for panels?
Methods
myPanel.close(): Closes the panel. All internal panel state is lost.myPanel.hide(): Hides the panel temporarily. If the window/object that the panel is anchored to moves while the panel is hidden, upon show it too has moved accordingly.myPanel.show(): Undoes thehide()operation.
Properties
myPanel.contentDocument: A pointer to the content document of the rich data window being displayed in the panel.myPanel.contentWindow: A pointer to the containing window of the document being displayed by the panel.
Reference Material
From the XUL reference guide: