Manages global application commands that can be called from menu items, key bindings, or subparts of the application.
This module dispatches these event(s):
Clear all commands for unit testing, but first make copy of commands so that they can be restored afterward
Looks up and runs a global command. Additional arguments are passed to the command.
Registers a global command.
Registers a global internal only command.
Executes the command. Additional arguments are passed to the executing function
Sets enabled state of Command and dispatches "checkedStateChange" when the enabled state changes.
Sets enabled state of Command and dispatches "enabledStateChange" when the enabled state changes.
Sets the name of the Command and dispatches "nameChange" so that UI that reflects the command name can update.
Note, a Command name can appear in either HTML or native UI so HTML tags should not be used. To add a Unicode character, use \uXXXX instead of an HTML entity.