Changes

Jump to: navigation, search

Labs/Jetpack/JEP/33

497 bytes added, 22:39, 4 December 2009
Proposal
<code>jetpack.addElement('window', {options})</code>
Where <tt>options</tt> is a property hashan objectProperties
* <tt>icon</tt> <i>uri</i> - icon to show in the title bar section of the window
* <tt>html</tt> <i>text/xml</i> - html content for the feature
* <tt>height</tt> <i>num</i> - initial height of the Window (480 - standard smartphone height resolution)
* <tt>persist</tt> <i>bool</i> - specifies whether or not a Window stay open when a user closes the browser instanc
* <tt>allowMaximize</tt> <i>bool</i> - specifies whether or not a Window will have the ability to maximize
* <tt>allowResize</tt> <i>bool</i> - specifies whether or not a user can resize a window
 
Events
* <tt>onFocus</tt> <i>func</i> - event triggered when the Window is focused
* <tt>onBlur</tt> <i>func</i> - event triggered when the Window losses focus
* <tt>onReady</tt> <i>func</i> - event triggered when the Window's content is loaded and ready for manipulation
* <tt>onMinimize</tt> <i>func</i> - event triggered when the Window is minimized to the task bar
* <tt>onMaximize</tt> <i>func</i> - event triggered when the Window is maximized
* <tt>onRestore</tt> <i>func</i> - event triggered when the Window is restored from the task bar
All events are passed the following property hash: * <tt>icon</tt> - a pointer to the icon used in the Window title bar. ** <tt>icon.default()</tt> - reload icon to original icon * <tt>contentDocument</tt> - document element of the content area * <tt>position</tt> - an object that includes the Window's position on the screen: {x: 400, y: 500} * <tt>location</tt> - the URL of the window, http://, chrome://
=== Example ===
1,273
edits

Navigation menu