O'Reilly logo

Rapid Application Development with Mozilla™ by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.3. How Commands Are Started

Mozilla commands can be started a number of ways. Here are all the possibilities:

  • If a functor or controller object is available, its methods can be called directly from JavaScript. This approach ignores the command system and treats the object like any other object.

  • The dispatcher's getControllerForCommand() method can be called directly from JavaScript. This method is a first step toward resolving a command name into actionable code. In this case, the dispatcher searches for a suitable command implementation.

  • The doCommand() method of a focusable XUL tag can be called directly from JavaScript. If this is done, then any <command> specified as a value of the command attribute will be executed. This method does not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required