Changes

Jump to: navigation, search

Labs/Ubiquity/Ubiquity Source Tip Author Tutorial

6 bytes added, 01:37, 22 June 2009
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({
namenames: ["say hello-world", "greet"],
preview: "Displays a <i>salutary</i> greeting to the planet.",
execute: function() {
1,007
edits

Navigation menu