This element is not displayed and serves as a container for command
elements.
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>
commandupdater
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
UpdateCommands
method 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.oncommandupdate
targets
Inherited Properties |