Commandset

This element is not displayed and serves as a container for command elements.

In addition, this element can serve as a command updater, which is used to update the enabled state of one or more commands when certain events occur. A common use of the command updater is to update the cut, copy, and paste menu items as the user selects text.

More information about commandset


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

commandupdater

Type: boolean

If true, the commandset is used for updating commands. Typically, this is used to update menu commands such as Undo and Cut based on when an event occurs. For example, since the Cut command is only valid when something is selected, a command updater might be used when the select event occurs.

events

Type: comma separated list

A comma separated list of event names that the command updater will update upon. If this attribute is not specified, or you set it to the value '*', all events are valid. Valid events are listed below, or you can use your own events. You can send a custom event by calling the UpdateCommands method of the command dispatcher.

oncommandupdate

Type: script code

This event occurs when a command update occurs. You would use this to update the disabled status of items.

targets

Type: comma separated list of element ids

A comma separated list of element ids that the command updater will update upon. If this attribute is not specified, or you set it to the value '*', all elements are valid. The command update will only occur when the event occurs to one of the specified elements.


Properties and Methods:

Inherited from XUL Element:

align allowEvents blur boxObject boxObject.element
boxObject.getLookAndFeelMetric boxObject.height boxObject.screenX boxObject.screenY boxObject.width
boxObject.x boxObject.y builder className click
collapsed contextMenu controllers database datasources
dir doCommand flex focus getElementsByAttribute
height hidden id left maxHeight
maxWidth menu minHeight minWidth observes
ordinal orient pack persist ref
resource statusText style tooltip tooltipText
top width

Inherited from Element:

addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName

Copyright (C) 1999 - 2004 XulPlanet.com