1,007
edits
Changes
→Adding a Preview
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.
For the "say hello-world" command, we don't need anything fancy: just some help text that is more descriptive than the default "Executes the say hello-world command."
<pre>
CmdUtils.CreateCommand({
preview: "Displays a <i>salutary</i> greeting to the planet.",
execute: function() {