Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsIController

An interface that can be implemented to receive and process commands and events.
Inherits from: nsISupports Last changed in Gecko 1.7

Method overview

void doCommand(in string command);
boolean isCommandEnabled(in string command);
void onEvent(in string eventName);
boolean supportsCommand(in string command);

Methods

doCommand()

When this method is called, your implementation should execute the command with the specified name.

void doCommand(
  in string command
);
Parameters
command
The name of the command to execute.

isCommandEnabled()

Implement this method to indicate whether or not the specified command is enabled.

boolean isCommandEnabled(
  in string command
);
Parameters
command
The name of the command whose availability is to be checked.
Return value

Return true if the specified command is currently available to be used; otherwise, it should return false.

onEvent()

Implement this method to process the event with the specified name.

void onEvent(
  in string eventName
);
Parameters
eventName
The name of the event to process.

supportsCommand()

Implement this method to report whether or not the command with the specified name is supported.

boolean supportsCommand(
  in string command
);
Parameters
command
The name of the command to determine whether or not it is supported.
Return value

true if the specified command is supported; otherwise false.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, madarche
 Last updated by: Sheppy,