Bug 1850713: remove duplicated setting of early hint preloader id in `ScriptLoader...
[gecko.git] / dom / commandhandler / nsIControllerCommand.idl
blob7a627391b9e95683462992f9d96136f722ab59e7
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
8 #include "nsICommandParams.idl"
10 /**
11 * nsIControllerCommand
13 * A generic command interface. You can register an nsIControllerCommand
14 * with the nsIControllerCommandTable.
17 [scriptable, uuid(0eae9a46-1dd2-11b2-aca0-9176f05fe9db)]
18 interface nsIControllerCommand : nsISupports
21 /**
22 * Returns true if the command is currently enabled. An nsIControllerCommand
23 * can implement more than one commands; say, a group of related commands
24 * (e.g. delete left/delete right). Because of this, the command name is
25 * passed to each method.
27 * @param aCommandName the name of the command for which we want the enabled
28 * state.
29 * @param aCommandContext a cookie held by the nsIControllerCommandTable,
30 * allowing the command to get some context information.
31 * The contents of this cookie are implementation-defined.
33 boolean isCommandEnabled(in string aCommandName, in nsISupports aCommandContext);
35 void getCommandStateParams(in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext);
37 /**
38 * Execute the name command.
40 * @param aCommandName the name of the command to execute.
42 * @param aCommandContext a cookie held by the nsIControllerCommandTable,
43 * allowing the command to get some context information.
44 * The contents of this cookie are implementation-defined.
46 [can_run_script]
47 void doCommand(in string aCommandName, in nsISupports aCommandContext);
49 [can_run_script]
50 void doCommandParams(in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext);