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 ...
Get Rapid Application Development with Mozilla™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.