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 it is a box, all box attributes can be used. By default, the window will have a platform-specific frame around it.
To set an icon for the window, create a platform-specific icon file <windowid>.ico and/or <windowid>.xpm and place or install these files into the <mozilla-directory>/chrome/icons/default/ directory. The <windowid> is the value of the id attribute on the window. This allows you to have a different icon for each window.
For properties and methods, see the XUL Window object.
Attributes:
height | hidechrome | id | screenX | screenY |
sizemode | title | width | windowtype |
Attributes:
Inherited from XUL Element:
align
allowevents
allownegativeassertions
class
coalesceduplicatearcs
collapsed
container
containment
context
contextmenu
datasources
dir
empty
equalsize
flags
flex
height
hidden
id
insertafter
insertbefore
left
maxheight
maxwidth
menu
minheight
minwidth
mousethrough
observes
ordinal
orient
pack
persist
popup
position
preference-editable
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width
height
Type: integer
Set this property to use a specific height for the window. This property, along with the width property, would usually be persisted with the persist attribute so that the next time the user opens the window, the height and width of the window will be the same as last time.
hidechrome
Type: boolean
Set this attribute to true to have the chrome including the titlebar hidden.
id
Type: element id, must be unique in the window
The window id. This is used to identify the window and to construct the filename for the icon for the window.
screenX
Type: integer
The horizontal position that the window appears on the screen.
screenY
Type: integer
The vertical position that the window appears on the screen.
sizemode
Type: one of the values below
The state of the window. The following values may be used:
- maximized: The window is maximized, and occupies the full size of the screen.
- minimized: The window is minimized, or hidden.
- normal: The window appears in a normal state at the desired size.
title
Type: string
The text to appear on the title bar of the window.
width
Type: integer
Set this property to use a specific width for the window.
windowtype
Type: string
Set to a string which can be used to identify the type of window. This might be used, for example, to distingush between a browser window and an editor window. Some of Mozilla's window handling functions use this attribute to group windows of the same type together.
Properties and Methods:
Inherited from XUL Element:
Inherited from Element: