Mozilla XUL Element and Script Reference

Contents  Quick Reference

Window

Describes the structure of a top-level window. It is the root node of a XUL document. It is by default a horizontally oriented box. As is it a box, all box attributes can be used. By default, the window will have a platform-specific frame around it.

For properties and methods, see the XUL Window object.

Attributes:

Attributes inherited from XUL Element


align

Determines the horizontal alignment of the children of the window.

autostretch

In the window is placed inside a horizontally oriented box, autostretch determines whether the window stretches vertically to fit the given space. For vertically oriented boxes, determines whether the window stretches horizontally to fit the given space. Stetching in the opoosite direction is controlled with the flex attribute.

collapsed

If true, then the window is collapsed and does not appear. It is equavalent to setting the CSS visibility property to collapsed.

crop

If the label of the window is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be placed in place of the cropped text.

debug

If true, extra borders are drawn around the element and all its descendants. This can be used to determine orientation and where flexible elements are. If debug mode is enabled for a box, horizontal oriented boxes are displayed with a blue border and vertical boxes are displayed with a red border. The border above the element will be straight for non-flexible elements and wavy for flexible elements.

flex

Indicates the flexibility of the window. Flexible elements grow and shrink to fit their given space. The actual value is not relevant unless there are other flexible elements with-in the same container. Elements with larger flex values will grow more than elements with lower flex values, at the ratio determined by the two elements.

height

The height of the window in pixels. It is recommended to use the CSS height property instead.

left

For elements placed within a bulletinboard, specifies the position of the left edge of the window.

orient

Used to specify whether the children of the window element are oriented horizontally or vertically.

persist

A space separated list of attributes that are maintained when the window is closed. When the window is re-opened, the values of persistant attributes are restored. In Mozilla, persistant attributes are stored in the per profile file localstore.rdf.

title

The text to appear on the title bar of the window.

top

For elements placed within a bulletinboard, specifies the position of the top edge of the window.

valign

Determines the vertical alignment of the children of the window.

width

The width of the window in pixels. It is recommended to use the CSS width property instead.