A command is the abstraction behind menu items, buttons, and links. Once a command is defined, other parts of the interface can refer to the same command, allowing many access points to a single feature to share facets such as the Disabled State.
Commands are defined to have the following facets:
These facets are exposed on elements using the command API:
Exposes the Type facet of the command.
Exposes the ID facet of the command.
Exposes the Label facet of the command.
Exposes the Hint facet of the command.
Exposes the Icon facet of the command.
Exposes the Access Key facet of the command.
Exposes the Hidden State facet of the command.
Exposes the Disabled State facet of the command.
Exposes the Checked State facet of the command.
Triggers the Action of the command.
HTMLCollection of the elements in the
Document that define commands and have IDs.
User agents may expose the commands whose Hidden State facet is false
(visible) and whose elements are in a
Document. For example, such commands could be
listed in the user agent's menu bar. User agents are encouraged to
do this especially for commands that have Access Keys, as a way to
advertise those keys to the user.