This element is not displayed and serves as a container for
In addition, this element can hold a command updater which is used to update commands when certain events occur. A common use of the command updater is to update cut, copy, and paste menu items.
More information is available in the XUL tutorial.
<commandset> <command id="cmd_open" oncommand="alert('Open!');"/> <command id="cmd_help" oncommand="alert('Help!');"/> </commandset>
- Type: boolean
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.
- 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
UpdateCommandsmethod of the command dispatcher.
focus: Occurs when the focused element changes.
select: Occurs when the selected text changed.
clipboard: Occurs when the clipboard is changed.
undo: Occurs when the undo buffer is changed.
- Type: script code
- This event occurs when a command update occurs. You would use this to update the disabled status of items.
- 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.