XUL Element and Script Reference

General Elements

XUL Document
Accessible through the global document object. Most of the createX methods are not implemented in Mozilla for XUL documents.
Properties and Methods: addBinding, addEventListener, characterSet, commandDispatcher, contentType, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createEvent, createNodeIterator, createProcessingInstruction, createRange, createTextNode, createTreeWalker, defaultView, dispatchEvent, doctype, documentElement, getAnonymousElementByAttribute, getAnonymousNodes, getBindingParent, getBoxObjectFor, getElementById, getElementsByAttribute, getElementsByTagName, getElementsByTagNameNS, height, implementation, importNode, loadBindingDocument, persist, popupNode, removeBinding, removeEventListener, setBoxObjectFor, tooltipNode, width

Node
A generic DOM node. The properties and methods described below are supported by all elements. All properties, except prefix, are read only.
Properties and Methods: appendChild, attributes, childNodes, cloneNode, firstChild, hasChildNodes, insertBefore, isSupported, lastChild, nextSibling, nodeName, nodeType, nodeValue, normalize, ownerDocument, parentNode, previousSibling, removeChild, replaceChild

Element
A generic element. This is the type of all HTML and XML elements as defined by the DOM.
Properties and Methods: getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getElementsByTagName, getElementsByTagNameNS, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNS, removeAttributeNode, setAttribute, setAttributeNS, setAttributeNode, setAttributeNodeNS, tagName

XUL Element
A XUL element. The following lists attribute and properties common to all XUL elements. Some only have any meaning in particular situations such as when placed inside a template or overlay.
Attributes: align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, contextmenu, datasources, debug, dir, empty, equalsize, flags, flex, flexgroup, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, observes, ordinal, orient, pack, persist, position, ref, removeelement, statustext, style, template, tooltip, tooltiptext, top, uri, width
Properties and Methods: addBroadcastListener, addEventListener, align, allowEvents, boxObject, builder, className, collapsed, contextmenu, controllers, createEvent, database, dir, flex, flexgroup, getElementsByAttribute, height, hidden, id, maxHeight, maxWidth, menu, minHeight, minWidth, observes, ordinal, orient, pack, persist, removeBroadcastListener, removeEventListener, resource, statusText, style, tooltip, tooltipText, width

Box Elements

box
A container element which can contain any number of child elements. If the box has an orient attribute that is set to horizontal, the child elements are laid out from left to right in the order that they appear in the box. If orient is set to vertical, the child elements are laid out from top to bottom. Child elements do not overlap. The default orientation is horizontal.

hbox
A container element which can contain any number of child elements. This is equivalent to the box element.

vbox
A container element which can contain any number of child elements. This is equivalent to the box element, except it defaults to vertical orientation.

Other Layout Elements

stack
An element that renders its children on top of each other. The first element if placed on the bottom, and each successive child is place above the previous one. All elements are displayed at once. Child elements may also be placed at absolute positions within the stack.

deck
An element that displays only one of its children at a time. The selectedIndex attribute determines which child is displayed.
Attributes: selectedIndex
Properties and Methods: selectedIndex, selectedPanel

scrollbox
A box with scrollbars that can be used to scroll the content inside it. It can be used when content is too large to fit in a window.

arrowscrollbox
A box which provides scroll arrows along its edges for scolling through the contents of the box. The user only needs to hover the mouse over the arrows to scroll the box. This element is typically used for large popup menus.

autorepeatbutton
Used to create the arrow buttons on an arrowscrollbox.

Grid Elements

grid
A grid is an element that contains both rows and columns elements. It is used to create a grid of elements. Both the rows and columns are displayed at once although only one will typically contain content, while the other may provide size information. Whichever is last in the grid is displayed on top.

columns
Defines the columns of a grid. Each child of a columns element should be a column element.

column
A single column in a columns element. Each child of the column element is placed in each successive cell of the grid. The column with the most child elements determines the number of rows in each column.

rows
Defines the rows of a grid. Each child of a rows element should be a row element.

row
A single row in a rows element. Each child of the row element is placed in each successive cell of the grid. The row with the most child elements determines the number of columns in each row.

List Elements

listbox
This element is used to create a list of items. This is a simpler version of a tree. Nested rows are not supported, but it may contain multiple columns.
Attributes: rows, seltype, suppressonselect
Properties and Methods: addItemToSelection, appendItem, clearSelection, currentItem, ensureElementIsVisible, ensureIndexIsVisible, getIndexOfFirstVisibleRow, getIndexOfItem, getItemAtIndex, getNextItem, getNumberOfVisibleRows, getPreviousItem, getRowCount, getSelectedItem, insertItemAt, invertSelection, listBoxObject, removeItemAt, removeItemFromSelection, scrollToIndex, selType, selectAll, selectItem, selectItemRange, selectedCount, selectedIndex, selectedItem, timedSelect, toggleItemSelection, value

listcols
A container for the columns of a listbox, each of which are created with the listcol element. There should be only one listcols element in a list box. If there is no listcols element, the list box has a single column.

listcol
A column in a list box. You can make some columns flexible and other columns non-flexible.

listitem
A single row in a list box. The text of the listitem is specified either using listcell elements, or by placing a label attribute directly on the listitem element. You may also place other elements inside the listitem for more complex content.
Attributes: accesskey, checked, command, crop, current, dir, disabled, image, label, orient, tabindex, type, value
Properties and Methods: accesskey, blur, checked, command, control, controllers, crop, current, doCommand, focus, image, label, selected, value

listcell
A single cell of a listbox, used for cells which contain text only.
Attributes: crop, label, type

listhead
A header row of a listbox.

Tree Elements

tree
A container which can be used to hold a tabular or hierarchical set of rows of elements. The tree may contain any number of rows and any number of columns. Each row of the tree may contain child rows which are displayed indented from the parent. The contents of a tree are most commonly generated from an RDF datasource.
Attributes: enableColumnDrag, flags, hidecolumnpicker, onselect, seltype
Properties and Methods: builderView, currentIndex, currentView, enableColumnDrag, firstOrdinalColumn, selectionHead, selectionTail, singleSelection, treeBoxObject, view

treecols
A group of treecol elements. There should one and only one treecols element in a tree.

treecol
A column of a tree. It displays the column header and holds the size and other information about the column. You can also place splitter elements between the columns to allow column resizing.
Attributes: crop, cycler, fixed, hidden, label, primary, sort, sortActive, sortDirection

treechildren
A element that defines a set of treeitem elements. It is used when multiple children of a displayed row are necessary.

treeitem
A treeitem should be placed inside a treechildren element and should contain treerow elements. The treeitem can be clicked by the user to select the row of the tree. The treeitem contains a single row and all of what appear to the user as that row's descendants.
Attributes: container, open, uri

treerow
A single row in a tree. It should be placed inside a treeitem element. Children of the treerow should be treecell elements. If child rows are necessary, they should be placed in a treechildren element inside the parent treeitem.
Attributes: properties

treecell
A single cell in a tree. This element should be placed inside a treerow. You can set the text for the cell using the label attribute.
Attributes: label, properties

treeseparator
Used to place a seperator row in a tree.

Frames

iframe
An inner frame that works much the HTML iframe element. The src attribute can be used to specify the content of the frame. This content is a separate document. The children of the iframe are ignored.
Properties and Methods: contentDocument, docShell, webNavigation

browser
An iframe which is expected to contain a read-only view of a Web document.
Properties and Methods: addProgessListener, canGoBack, canGoForward, contentDocument, contentViewerEdit, contentViewerFile, contentWindow, currentURI, docShell, documentCharsetInfo, goBack, goForward, goHome, gotoIndex, homePage, loadURIWithFlags, loadURL, markupDocumentViewer, preferences, preferences, reload, reloadWithFlags, removeProgressListener, sessionHistory, stop, webBrowserFind, webNavigation, webProgress

tabbrowser
This element is used for holding a set of read-only views of Web documents. Similar to the browser element, except that mutliple documents can be displayed, each in a separate tab.
Attributes: contentcontextmenu, contenttooltip
Properties and Methods: addProgessListener, addTab, canGoBack, canGoForward, contentDocument, contentViewerEdit, contentViewerFile, contentWindow, currentURI, docShell, documentCharsetInfo, getBrowserForTab, goBack, goForward, goHome, gotoIndex, homePage, loadURIWithFlags, loadURL, markupDocumentViewer, preferences, reload, reloadAllTabs, reloadTab, reloadWithFlags, removeAllTabsBut, removeCurrentTab, removeProgressListener, removeTab, selectedTab, sessionHistory, stop, webBrowserFind, webNavigation, webProgress

editor
An iframe which is expected to contain an editable Web document.
Properties and Methods: contentDocument, docShell, webNavigation

Main Widgets

button
A button that can be pressed by the user. Event handlers can be used to trap mouse, keyboard and other events. It is typically rendered as a grey outset rectangle. You can specify the label of the button using the label attribute or by placing content inside the button.
Attributes: accesskey, autoCheck, checkState, checked, command, crop, dir, disabled, dlgType, group, image, label, open, orient, tabindex, type, value
Properties and Methods: accesskey, autoCheck, blur, checkState, checked, command, controllers, crop, dir, dlgType, doCommand, focus, group, image, label, open, orient, type, value

checkbox
An element that can be turned on and off. This is most commonly rendered as a box when the element is off and a box with a check when the element is on. The user can switch the state of the check box by selecting it with the mouse. A label, specified with the label attribute may be added beside the check box to indicate to the user as to its function.
Attributes: accesskey, checked, command, crop, disabled, image, label, tabindex, value
Properties and Methods: accesskey, blur, checked, command, controllers, crop, doCommand, focus, image, label, value

radio
An element that can be turned on and off. Radio buttons are almost always grouped together in groups. Only one radio button within the same group may be turned on at a time. The user can switch which radio button is turned on by selecting it with the mouse or keyboard. Other radio buttons in the same group are turned off. A label, specified with the label attribute may be added beside the radio button to indicate to the user as to its function.
Attributes: accesskey, checked, command, crop, disabled, focused, image, label, selected, tabindex, value
Properties and Methods: accesskey, blur, checked, command, controllers, crop, doCommand, focus, image, label, radioGroup, selected, value

textbox
A text input field in which the user can enter text. It is similar to the HTML input element. Only one line of text is displayed by default. The multiline attribute can be specified to display a field with multiple rows.
Attributes: disabled, focused, maxlength, multiline, oninput, readonly, size, type, value, wrap
Properties and Methods: controllers, disabled, maxlength, readonly, selectionEnd, selectionStart, setSelectionRange, size, textLength, type, value

textbox(autocomplete)
This element is created by setting the type attribute of a textbox to 'autocomplete'. It is used to create a textbox with a popup containing a list of possible completions for what the user has started to type.
Attributes: autoFill, autoFillAfterMatch, crop, disableAutocomplete, flexPopup, focused, forceComplete, hideHistory, label, maxrows, oninit, ontextcommand, ontextrevert, open, searchSessions, showCommentColumn, showPopup, tabScrolling, timeout, userAction
Properties and Methods: addSession, autoFill, autoFillAfterMatch, clearResults, crop, disableAutocomplete, flexPopup, focused, forceComplete, getDefaultSession, getResultAt, getResultCount, getResultValueAt, getSession, getSessionByName, getSessionResultAt, getSessionValueAt, hideHistory, isSearching, isWaiting, label, maxRows, noMatch, open, removeSession, resultsPopup, searchSessions, sessionCount, showCommentColumn, showPopup, syncSessions, tabScrolling, timeout, userAction

description
This element is used to create a block of text. The text can be set either with the value attribute or by placing text inside the open and close description tags. The value attribute is used to set text that appears in a single line. If text appears as a child of the description, it will wrap to multiple lines. If may contain arbitrary markup, which can be styled as needed.
Attributes: crop, disabled, value
Properties and Methods: crop, disabled, value

label
This element is used to provide a label for an control element, If the user clicks the label, it will move the focus to the associated control, specified with the control attribute.
Attributes: accesskey, control, crop, disabled, value
Properties and Methods: accesskey, control, crop, disabled, value

image
An element that displays an image, much like the HTML img element. The src attribute can be used to specify the URL of the image.
Attributes: onerror, onload, src, validate
Properties and Methods: src

separator
Creates a separator bar. This type of separator should be used to separate parts of a dialog. It is functionally equivalent to a spacer but some skins may apply a different appearance.

spacer
An element that takes up space but does not display anything. It is usually used to place spacing within a container.

Scroll Bars

scrollbar
When a container contains contents which are larger that the size of the content, scroll bars may be placed at the side of the container to allow the user to scroll around in the container. The scroll bar may also be used independently when a numeric value or percentage needs to be selected by the user. The user can adjust the position of the scroll bar by clicking arrows on either end of the scroll bar or by dragging the scroll bar thumb around.
Attributes: curpos, increment, maxpos, pageincrement

scrollbarbutton
A button on the end of a scrollbar which is used to adjust the position of the scroll bar thumb.
Attributes: accesskey, crop, disabled, image, label, type

slider
This element is essentially a scrollbar without the scroll bar buttons. It is used in implementing a scrollbar.
Attributes: curpos, increment, maxpos, pageincrement

thumb
A scroll bar thumb, used by the scrollbar and slider elements.
Attributes: disabled

Menus

menubar
A container that usually contains menu elements. On the Macintosh, the menubar is displayed along the top of the screen, and all non-menu related elements inside the menubar will be ignored.
Attributes: accesskey, command, crop, disabled, grippyhidden, image, label, value
Properties and Methods: accesskey, command, crop, disabled, doCommand, image, label, value

menu
An element, much like a button, that is placed on a menu bar. When the user clicks the menu element, the child menupopup of the menu will be displayed.
Attributes: accesskey, allowevents, crop, disabled, image, label

menupopup
A container used to display menus. It should be placed inside a menu, menulist, or menubutton element. It can contain any element but usually will contain menuitem elements. It is a type of box that defaults to vertical orientation.
Attributes: oncontextmenu, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position
Properties and Methods: activeChild, autoPosition, enableKeyboardNavigator, enableRollup, hidePopup, moveTo, openPopup, popupBoxObject, sizeTo

menuitem
A single choice in a menupopup element. It acts much like a button but it is rendered on a menu.
Attributes: accesskey, checked, command, crop, disabled, image, key, label, modifiers, name, selected, type, validate, value
Properties and Methods: accesskey, command, crop, disabled, doCommand, image, label, value

menulist
An element that can be used for drop-down choice lists. The user may select one of the elements displayed in the menulist. The currently selected choice is displayed on the menulist element. To create the drop-down, put a menupopup inside the menulist containing the choices as menuitem elements.
Attributes: editable
Properties and Methods: appendItem, insertItemAt, removeItemAt, selectedIndex, selectedItem

menuseparator
Used to create a separator between menu items. Typically drawn as a thin line.

Popups

popupset
A container for popup elements. You may declare all popup elements as children of a popupset, although it is not necessary. This element and all of its descendants does not display on screen. Child popups will be displayed when asked to by other elements.

popup
A container that appears in a child window. The popup window does not have any special frame. Popups can be displayed when an element is clicked by assigning the id of the popup to either the popup, context or tooltip attribute of the element. A popup is a type of box that defaults to vertical orientation.
Attributes: onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position
Properties and Methods: activeChild, autoPosition, enableKeyboardNavigator, enableRollup, hidePopup, moveTo, openPopup, popupBoxObject, sizeTo

tooltip
This element is used for the tooltip popups.
Attributes: default, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position
Properties and Methods: activeChild, closePopup, openPopup

Toolbars

toolbox
A container for toolbars. It is a type of box but defaults to vertical orientation. If a toolbar is placed inside a toolbox, a grippy is displayed on its left or upper edge. The user may click the grippy to collapse the toolbar. If multiple toolbars are placed in the same toolbox, they will all collapse into the same row.
Properties and Methods: collapseToolbar, expandToolbar

toolbar
A container which typically contains a row of buttons. It is a type of box that defaults to horizontal orientation. It can be collapsed with a grippy when the toolbar is placed inside a toolbox. The toolbar should always have an id attribute.
Attributes: grippyhidden

toolbarbutton
A button that appears on a toolbar. It is equivalent to a regular button except that it may be rendered differently.
Attributes: accesskey, command, crop, dir, disabled, image, label, orient, tabindex, type, validate, value
Properties and Methods: accesskey, blur, command, controllers, crop, dir, doCommand, focus, image, label, orient, type, value

toolbarseparator
Creates a separator between a group of toolbar buttons. It is functionally equivalent to a normal separator but some skins may apply a different appearance.
Attributes: crop, flex, height, label, left, maxheight, maxwidth, minheight, minwidth, orient, top, width

toolbargrippy
The notch on the side of a toolbar which can be used to collapse and expand it. This element is used internally by the toolbar and should only be used directly when modifying its skin.

Tabboxes

tabbox
A container used to display tabbed pages of elements to the user. The tabbox should contain two children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages. This is a type of box that defaults to vertical orientation.
Properties and Methods: selectedIndex, selectedPanel, selectedTab

tabs
A row of tabs. A tabs element should be placed inside a tabbox and should contain tab elements.
Properties and Methods: advanceSelectedTab, appendItem, insertItemAt, removeItemAt, selectedIndex, selectedItem

tab
A single tab which should be placed inside a tabs element. The user may click a tab to bring the associated page of the tabbox to the front.
Attributes: afterselected, beforeselected, label, selected
Properties and Methods: label, selected, tabs

tabpanels
A container to hold the set of pages in a tabbox. The tabpanels element should be placed in a tabbox. The tabpanels element should contain tabpanel elements, one for each page. By clicking the first tab, the first panel will be displayed. By clicking the second tab, the second panel will be displayed.
Attributes: selectedIndex
Properties and Methods: selectedIndex, selectedPanel

tabpanel
A individual panel in a tabpanels element. This is a box that defaults to vertical orientation.

Status Bars

statusbar
An element used to create a status bar, usually placed along the bottom of a window. It is virtually equivalent to a standard box, but may be rendered differently.

statusbarpanel
An individual element of a statusbar. This is a special type of button.
Attributes: accesskey, command, crop, dir, disabled, image, label, orient, tabindex, type, value
Properties and Methods: accesskey, blur, command, controllers, crop, dir, doCommand, focus, image, label, orient, type, value

Group Elements

radiogroup
A box that draws a frame around it and expects to have radio elements as children. A header label can be created with the caption element. The radiogroup defaults to vertical orientation.
Attributes: disabled, value
Properties and Methods: appendItem, checkAdjacentElement, focusedItem, insertItemAt, removeItemAt, selectedItem, value

groupbox
A box that draws a frame around it. If a caption element is placed inside the groupbox, it will be used as a caption which appears along the top of the groupbox.

caption
A header for the groupbox. It may contain either a text label, using the label attribute, or child elements for a more complex caption.
Attributes: label
Properties and Methods: label

Miscellaneous Widgets

progressmeter
A meter which can be used to display the progress of a lengthy operation. It is drawn as a bar that is filled as the operation completes. In addition, a non-deterministic progressmeter may be created by setting the mode attribute. This is used when the length of time to complete an operation is not known beforehand.
Attributes: mode, value
Properties and Methods: mode, value

colorpicker
An element that allows the user may use to select a color from. Mozilla renders this as a grid of colors. The user may select a color by clicking on one of the grid cells.
Attributes: color, type
Properties and Methods: color

splitter
An element which should appear before or after an element inside a container. When the splitter is dragged, the sibling elements of the splitter are resized. When the grippy on the splitter is clicked, one sibling element of the splitter is collapsed.
Attributes: collapse, resizeafter, resizebefore

grippy
An element that appears on a splitter which can be used to collapse a sibling element of the splitter.

Keyboard Shortcuts

keyset
A container element for key elements. The keyset and its descendants are not displayed.

key
The key element defines a keyboard shortcut. Event handlers can be used to respond when the appropriate keys are pressed.
Attributes: cancel, charcode, disabled, keycode, modifiers

Broadcast Elements

broadcasterset
A container element for broadcaster elements. The broadcasterset and its descendants are not displayed.

broadcaster
A broadcaster will send an event and attribute changes to multiple elements that are observing the broadcaster and can each respond as necessary.

observes
The observes attribute can be used to listen to a broadcaster and receive events and attributes from it. The observes attribute should be placed inside the element that wants to observe the broadcaster.
Attributes: attribute, noattribselement

commands

commandset
A container for command elements.
Attributes: commandupdater, events, oncommandupdate

command
A command element can be used to invoke an operation that can come from multiple sources. For example, a clipboard paste operation can be invoked from the Edit menu, a context menu and by pressing a keyboard shortcut. You attach the code to the command using the oncommand attribute. It will be called no matter how it is invoked by the user. In addition, disabling the command will automatically disable the menu items and keyboard shortcuts.
Attributes: disabled, label, oncommand

Templates

template
Used to declare a template for rule-based construction of elements. Elements are constructed from a datasource. For more information see the rule element.

rule
A rule used in a template. The children of the rule are used to declare the conditions in which the rule matches and the content that is generated. When the content needs to be displayed, the template builder scans through the RDF datasource searching for nodes that match the rules. When a rule is matched, the corresponding content is generated.
Attributes: iscontainer, isempty, parent

bindings
Should be contained within a rule. Used to specify a set of variable bindings for a rule. This element should contain one or more binding elements.

binding
Should be contained within a bindings element. A binding is used to bind a variable to a node. Like the triple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name. That name can then be used within the action of a rule.
Properties and Methods: object, predicate, subject

action
Should be contained within a rule element. It is used to specify the generated content for each matched node. Within the action, attributes are parsed for resource and variable references.

conditions
This element should appear directly inside a rule element and is used to define conditions for the rule. Within the conditions can be placed content, member and triple elements. These may have attributes whose value is a variable name beginning with a question mark (?). When evaluating the rule for a particular RDF resource, the variables are replaced with values from the resource. If all variables can be replaced, the rule matched.

content
This element should appear inside a conditions element. A rule's conditions should contain one and only one content element. The content element should also have a uri attribute. It is used to bind a variable to a content node during matching. When using a tree with the 'flags' attribute set to 'dont-build-content', use a treeitem element instead.
Properties and Methods: tag, uri

triple
A triple can be included inside a rule's conditions element. It is used check for an assertion within a graph. If such an assertion exists, the rule may match, assuming that all the conditions match. If the assertion does not exist, the rule will not match. Both the subject and object attributes may be variables.
Properties and Methods: object, predicate, subject

member
Used within a rule's conditions element to match elements that are containers or are contained within another element. Both the container and child attributes may use variables.
Properties and Methods: child, container

textnode
Normally when substituting RDF resources in template rules, you place the RDF property name inside an attribute value preceded with 'rdf:'. In the case of the textnode element, the entire node is replaced with text corresponding to the result of the value attribute.
Attributes: value

Wizard Elements

wizard
This element is used to construct a step-by-step wizard found in some applications to guide users through a task. It is used for a window with several steps contained on several pages. This element provides the header and buttons along the bottom, and also handles navigation between the pages. Each page should be constructed using a wizardpage. The pages are displayed in the order that they are placed in the wizard, unless you use the next and pageid attributes on the pages to change the sequence. The wizard will rendered in a manner suitable for the user's selected theme and platform.
Attributes: onwizardback, onwizardcancel, onwizardfinish, onwizardnext, title
Properties and Methods: advance, canAdvance, canRewind, cancel, currentPage, getButton, getPageById, goTo, onFirstPage, onLastPage, pageCount, pageIndex, pageStep, rewind, title, wizardPages

wizardpage
This element defines a page in a wizard. The content in the pages should be placed inside the wizardpage element.
Attributes: description, label, next, onpageadvanced, onpagehide, onpagerewound, onpageshow, pageid
Properties and Methods: next, pageid

Windows and Scripts

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.
Attributes: height, screenX, screenY, sizemode, title, width, windowtype

dialog
This element should be used in place of the window element for dialog boxes. The buttons attribute may be used to set which buttons should appear in the dialog box. These buttons will be placed in the correct locations.
Attributes: buttonalign, buttondir, buttonorient, buttonpack, buttons, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, title
Properties and Methods: acceptDialog, buttons, cancelDialog, getButton

page
Similar to a window, except it should be used for XUL files that are to be loaded into an iframe.

overlay
An overlay is used when it is desirable for a block of content to be shared between several different windows. In addition, it can be used to append or alter content in an existing window. An overlay is defined in a separate XUL file.
Attributes: class, id

script
Much like the HTML script element, this is used to declare a script to be used by the XUL window. You should usually put scripts in a separate file pointed to by the src attribute, but you may also place the script inline inside the opening and closing script tags.
Attributes: src, type

titlebar
Used to represent a title bar.

resizer
An element used for window resizing.
Attributes: resizerdirection

stringbundle
An element which can be used to load localized resources from property files.
Attributes: src
Properties and Methods: appLocale, getString, stringBundle

stringbundleset
A container for stringbundle elements.

resourcebundle
This element is used as a placeholder to attach a binding containing resources to.

Global Script Objects

Navigator
The global navigator object that contains information about the environment in which the XUL document is loaded in.
Properties and Methods: appCodeName, appName, appVersion, cookieEnabled, javaEnabled, language, mimeTypes, oscpu, platform, plugins, preference, product, productSub, securityPolicy, userAgent, vendor, vendorSub

Event
The event object that is available in all event handlers. you can access it through the object event and it contains properties that provide information about the event.
Properties and Methods: altKey, bubbles, button, cancelable, charCode, clientX, clientY, ctrlKey, currentTarget, detail, eventPhase, isChar, keyCode, layerX, layerY, metaKey, originalTarget, pageX, pageY, preventBubble, preventCapture, rangeOffset, rangeParent, relatedTarget, screenX, screenY, shiftKey, stopPropagation, target, timeStamp, type, view, which

XUL Window
The global window object. It has all the properties as the window object for HTML documents, although some properties are not used for anything.
Properties and Methods: Components, alert, arguments, blur, captureEvents, clearInterval, clearTimeout, close, closed, confirm, controllers, disableExternalCapture, document, dump, enableExternalCapture, escape, focus, frames, getComputedStyle, history, innerHeight, innerWidth, length, moveBy, moveTo, name, navigator, open, openDialog, opener, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, prompt, releaseEvents, resizeBy, resizeTo, routeEvent, screen, screenX, screenY, scroll, scrollBy, scrollTo, scrollX, scrollY, self, setCursor, setInterval, setTimeout, sizeToContent, top, unescape, updateCommands, window

Screen
An object that can provide information about the user's display. It also supports users who have multiple monitors on some platforms. These properties are read-only. You can get a screen object from the window object's screen property.
Properties and Methods: availHeight, availLeft, availTop, availWidth, colorDepth, height, left, pixelDepth, top, width

Event Handlers

Event Handlers
The following describes the event handlers that are valid for most XUL elements.
Attributes: onblur, onbroadcast, onclick, onclose, oncommand, oncommandupdate, oncontextmenu, ondblclick, ondragdrop, ondragenter, ondragexit, ondraggesture, ondragover, onfocus, oninput, onkeydown, onkeypress, onkeyup, onload, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onoverflow, onoverflowchanged, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, onunderflow, onunload

XBL Elements

bindings
The root node of an XBL file. It should contain one or more binding tags.
Attributes: class, id

binding
Declares a binding. The id attribute is used to identify a binding and refer to it within a style sheet via the -moz-binding property. The same binding can be used to attach to any number of elements.
Attributes: class, display, extends, id

content
Used to define the anonymous content of a binding. The elements within the content tag become the anonymous content of the element bound to. The content is visible on screen as if it was present directly in the XUL file, however the elements cannot be seen via the normal DOM functions.
Attributes: class, id

children
Specifies the location where any child elements of the bound element are placed in the generated content.
Attributes: class, id, includes

handlers
Used to hold handler elements, which are used to declare event handlers.
Attributes: class, id

handler
Specifies event handlers which the XBL element responds to. You can provide default handling which can be overriden by an appropriate handler on the bound element. When the event occurs, the code contained in the action attribute or, if the action is not present, the content of the handler tag is executed.
Attributes: action, button, capturing, charcode, class, clickcount, event, id, keycode, modifiers, phase

implementation
Used to contain property and method declarations for the element.
Attributes: class, id, implements

property
Declares a JavaScript property that is added to the element's object. The property element may have a getter child element and a setter child element to get and set the value of the property respectively.
Attributes: class, id, name, onget, onset, readonly

field
A field is similar to a property, except that should not have a getter or setter. It is useful as a simple holder for a value.
Attributes: class, id, name, readonly

getter
Defines code which is called to retrieve the value of a property. The code should return the value of the property.
Attributes: class, id

setter
Defines code which is called to modify the value of a property. The variable val is defined as the value to set the property to.
Attributes: class, id

method
Declares a JavaScript method that is added to the element's object. The method may take arguments, declared with the parameter element.
Attributes: class, id, name

parameter
Declares a parameter to a method. Each parameter has a name attribute with becomes a variable that is declared in the method body and has the value that was passed in to the method.
Attributes: class, id, name

body
The content of the body element should be the code to execute when the method is called.
Attributes: class, id

constructor
The code inside this element is called when the binding is attached to an element. You can use this to initialize the content the binding uses. The constructor should be placed inside the implementation element.
Attributes: action, class, id

destructor
The code inside this element is called when the binding is removed from an element. You can use this to unload resources to free memory. The destructor should be placed inside the implementation element.
Attributes: action, class, id

resources
Used to specify a list of resources that the binding uses. This includes images, using the image element or style sheets using the stylesheet element. The resources element should be placed directly inside the binding element.
Attributes: class, id

image
Declares an image resource used by the binding. The image is loaded as soon as the binding is used. You can use this to preload a number of images for later use.
Attributes: class, id, src

stylesheet
Declares a style sheet used by the binding. Using this element is preferred over using an XML processing instruction.
Attributes: class, id, src

XPInstall Objects

InstallTrigger
Used to trigger an installation of a component. The component should be an XPI file containing the files to installed. The XPI file will be downloaded and the install.js script within the installer will be executed. This object is a global object and its methods can be called directly.
Properties and Methods: compareVersion, enabled, getVersion, install, installChrome, startSoftwareUpdate

Install
An object used for installations. This object is only available within an installation script.
Properties and Methods: Install, addDirectory, addFile, alert, archive, arguments, buildID, cancelInstall, confirm, deleteRegisteredFile, execute, flags, gestalt, getComponentFolder, getFolder, getLastError, getWinProfile, getWinRegistry, initInstall, jarfile, loadResources, logComment, patch, performInstall, platform, refreshPlugins, registerChrome, resetError, setPackageFolder, uninstall, url

File
The File object can be used to manipulate files. Like the Install functions, the functions of the File object only assign an operation to be performed once the installation has begun.
Properties and Methods: copy, dirCreate, dirGetParent, dirRemove, dirRename, diskSpaceAvailable, execute, exists, isDirectory, isFile, macAlias, modDate, modDateChanged, move, nativeVersion, remove, rename, size, unixLink, windowsRegisterServer, windowsShortcut

XMLExtras Objects

DOMParser
This object is used to parse strings of text into DOM document trees. The two functions return documents from a string or stream of XML or HTML text.
Properties and Methods: parseFromStream, parseFromString

XMLSerializer
This object is used to convert a document or a part of a document into a string. It is the reverse of the DOMParser object. The functions take a document node and return a string or write the string form to a stream.
Properties and Methods: serializeToStream, serializeToString

XMLHttpRequest
This object can be used to make HTTP requests. You can set headers and the method (GET or POST) before making the request. Once the connection has been made you can retrieve response headers and the returned content as plain text or as a parsed document.
Properties and Methods: abort, channel, getAllResponseHeaders, getResponseHeader, onerror, onload, open, responseText, responseXML, send, setRequestHeader, status, statusText

Some of Mozilla's Built-in Datasources

rdf:bookmarks
This datasource holds the user's bookmarks. Each bookmark holds a title and URL and information about ehen the user has visited the bookmark and the schedule for checking when the URL is checked for updates. The root of the bookmarks datasource is NC:BookmarksRoot. You can also use the roots NC:PersonalToolbarFolder for the folder holding personal toolbar items and NC:IEFavoritesRoot for the folder containing the imported IE favorites.
Resource Properties: rdf:BookmarkAddDate, rdf:Description, rdf:LastModifiedDate, rdf:LastVisitDate, rdf:Name, rdf:Schedule, rdf:ShortcutURL, rdf:URL, rdf:status, rdf:type
Resource Commands: rdf:deletebookmark, rdf:deletebookmarkfolder, rdf:deletebookmarkseparator, rdf:export, rdf:import, rdf:newbookmark, rdf:newfolder, rdf:newseparator, rdf:setnewbookmarkfolder, rdf:setnewsearchfolder, rdf:setpersonaltoolbarfolder

rdf:history
The history datasource holds a list of the pages that the user has visited. It is available in two forms, a flat list by using NC:HistoryRoot and organized by day by using NC:HistoryByDate. In this latter form, items are stored in one of seven folders, storing URLs visited in each of the recent seven days. URLs visited earlier are placed in the last folder.
Resource Properties: rdf:Date, rdf:FirstVisitDate, rdf:Hostname, rdf:Name, rdf:Referrer, rdf:URL, rdf:VisitCount

rdf:files
The files datasource holds a tree of the user's filesystem. Use NC:FilesRoot in a ref attribute to grab the file list from the root. Alternatively, you can use a file URL to specify a particular directory.
Resource Properties: rdf:Content-Length, rdf:LastModifiedDate, rdf:Name, rdf:URL, rdf:extension

rdf:window-mediator
This datasource holds a list of all of the open windows. Use a ref value of NC:WindowMediatorRoot in a template.
Resource Properties: rdf:Name